Skip to content

Commit

Permalink
Fix for 24.x when template string is incomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
taku0 committed Feb 23, 2022
1 parent e4c6070 commit 30a867d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions kotlin-mode-lexer.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand All @@ -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))
Expand Down

0 comments on commit 30a867d

Please sign in to comment.