]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix recent changes in typescript-ts-mode.el
authorYuan Fu <casouri@gmail.com>
Wed, 4 Jun 2025 05:44:13 +0000 (22:44 -0700)
committerEshel Yaron <me@eshelyaron.com>
Sat, 7 Jun 2025 20:00:30 +0000 (22:00 +0200)
* 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

index 509ad3a1d4c0f871937ef684fb5b5638ec190d7c..6aa64706d3c639c6927db9604d6249050c321c94 100644 (file)
@@ -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))))))