branch: elpa/typescript-mode
commit 895cd7f42550a4a0a7ed87f5cc3644117bfac4d5
Author: Jevri <[email protected]>
Commit: Jostein Kjønigsen <[email protected]>

    Fix indentation infinite looping
    
    With unbalanced parentheses typescript--backward-to-parameter-list goes in 
to an infinite loop.
---
 typescript-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/typescript-mode.el b/typescript-mode.el
index ff2f8674cc..9f0dd9c03d 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -2432,7 +2432,7 @@ moved on success."
                                  (looking-at 
"\\_<\\(switch\\|if\\|while\\|until\\|for\\)\\_>\\(?:\\s-\\|\n\\)*(")))))
                     (condition-case nil
                         (backward-sexp)
-                      (scan-error nil)))
+                      (scan-error (cl-return-from search-loop nil))))
                    ((looking-back typescript--number-literal-re
                                   ;; We limit the search back to the previous 
space or end of line (if possible)
                                   ;; to prevent the search from going over the 
whole buffer.

Reply via email to