emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/kotlin-mode 1854330e27 06/10: Fix for 24.x when template s


From: ELPA Syncer
Subject: [nongnu] elpa/kotlin-mode 1854330e27 06/10: Fix for 24.x when template string is incomplete
Date: Tue, 17 Jan 2023 15:08:09 -0500 (EST)

branch: elpa/kotlin-mode
commit 1854330e27a2e52d8f83fb4e81d6c5fdc9522580
Author: taku0 <mxxouy6x3m_github@tatapa.org>
Commit: taku0 <mxxouy6x3m_github@tatapa.org>

    Fix for 24.x when template string is incomplete
---
 kotlin-mode-lexer.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/kotlin-mode-lexer.el b/kotlin-mode-lexer.el
index 6e45212430..cf37034d84 100644
--- a/kotlin-mode-lexer.el
+++ b/kotlin-mode-lexer.el
@@ -2464,10 +2464,12 @@ Return the point of the beginning.
 Assuming the point is on a string."
   (goto-char (or (nth 8 (syntax-ppss)) (point)))
   (let (matching-bracket)
-    (while (setq matching-bracket
-                 (get-text-property
-                  (point)
-                  'kotlin-property--matching-bracket))
+    (while (and
+            (setq matching-bracket
+                  (get-text-property
+                   (point)
+                   'kotlin-property--matching-bracket))
+            (< (point-min) matching-bracket))
       (goto-char matching-bracket)
       (goto-char (nth 8 (syntax-ppss))))
     (point)))
@@ -2479,10 +2481,11 @@ Assuming the point is on a string."
   (goto-char (or (nth 8 (syntax-ppss)) (point)))
   (let (matching-bracket)
     (kotlin-mode--forward-string-chunk)
-    (while (setq matching-bracket
-                 (get-text-property
-                  (1- (point))
-                  'kotlin-property--matching-bracket))
+    (while (and (setq matching-bracket
+                      (get-text-property
+                       (1- (point))
+                       'kotlin-property--matching-bracket))
+                (< matching-bracket (point-max)))
       (goto-char matching-bracket)
       (kotlin-mode--forward-string-chunk)))
   (point))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]