branch: elpa/typst-ts-mode
commit 49a3981040431bad5ce3419fc644dff871c745e6
Author: Huan Nguyen <nguyenthieuh...@gmail.com>
Commit: Huan Nguyen <nguyenthieuh...@gmail.com>

    fix: Only search for the current line.
---
 typst-ts-mode.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/typst-ts-mode.el b/typst-ts-mode.el
index 2b5d84828e..b99d163545 100644
--- a/typst-ts-mode.el
+++ b/typst-ts-mode.el
@@ -1001,7 +1001,10 @@ Using ARG argument will ignore the context and it will 
insert a heading instead.
               (treesit-node-at
                (save-excursion
                   (beginning-of-line)
-                  (search-forward-regexp (rx (or "+" "-" ".")))
+                  (search-forward-regexp (rx (or "+" "-" "."))
+                                         (pos-eol)
+                                         t
+                                         nil)
                   (left-char)
                   (point))))))
     (cond

Reply via email to