From 5907a53704efe0705aee965ba2ea3f0443f8e7c5 Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Tue, 3 Jun 2025 22:44:13 -0700 Subject: [PATCH] ; Fix recent changes in typescript-ts-mode.el * lisp/progmodes/typescript-ts-mode.el: (typescript-ts--standalone-parent-p): Add a limit to the looking-back call. (cherry picked from commit d1fa5115123ec913c11f9e3ea43772855495f03a) --- lisp/progmodes/typescript-ts-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/typescript-ts-mode.el b/lisp/progmodes/typescript-ts-mode.el index 509ad3a1d4c..6aa64706d3c 100644 --- a/lisp/progmodes/typescript-ts-mode.el +++ b/lisp/progmodes/typescript-ts-mode.el @@ -245,7 +245,7 @@ This is used for `treesit-simple-indent-standalone-predicate'." ;; chaining, allow a dot to be before the node. ((looking-back (rx bol (* whitespace) (? ".")) (line-beginning-position)) - (if (looking-back "\\." nil) + (if (looking-back "\\." (max (point-min) (1- (point)))) (1- (point)) (point)))))) -- 2.39.5