branch: elpa/typescript-mode
commit bc37bc4b1527f0ad382bbdcecf2ea3623717aebb
Author: Louis-Dominique Dubeau <[email protected]>
Commit: Louis-Dominique Dubeau <[email protected]>
Fix another member expression infinite loop.
---
typescript-mode.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/typescript-mode.el b/typescript-mode.el
index 1638dfa915..e0d4f841af 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -2280,8 +2280,13 @@ starts the member expression.
;; And set an indent relative to that.
(while (looking-at "\\.")
(typescript--backward-syntactic-ws)
- (while (memq (char-before) '(?\] ?} ?\)))
- (backward-list)
+ (while (eq (char-before) ?\;)
+ (backward-char))
+ (while (memq (char-before) '(?\] ?} ?\) ?>))
+ (if (not (eq (char-before) ?>))
+ (backward-list)
+ (backward-char)
+ (typescript--backward-over-generic-parameter-list))
(typescript--backward-syntactic-ws))
(if (looking-back typescript--dotted-name-re nil)
(back-to-indentation)