[Top][All Lists]

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

[elpa] externals/phps-mode 99dfc68 067/405: Incremental-lexer deletes af

From: Stefan Monnier
Subject: [elpa] externals/phps-mode 99dfc68 067/405: Incremental-lexer deletes affected overlays
Date: Sat, 13 Jul 2019 09:59:44 -0400 (EDT)

branch: externals/phps-mode
commit 99dfc686eb3abf6d8137d3b0d6e28ee92661d470
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>

    Incremental-lexer deletes affected overlays
 phps-lexer.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/phps-lexer.el b/phps-lexer.el
index bd0a586..ca68697 100644
--- a/phps-lexer.el
+++ b/phps-lexer.el
@@ -1319,6 +1319,10 @@ ANY_CHAR'
                     (throw 'stop-iteration nil)
             (setq old-tokens (nreverse old-tokens))
+            ;; Delete all overlays from point of change to end of buffer
+            (dolist (overlay (overlays-in previous-token-start (point-max)))
+                (delete-overlay overlay))
             (let* ((new-tokens (semantic-lex previous-token-start (point-max)))
                    (appended-tokens (append old-tokens new-tokens)))
@@ -1327,6 +1331,7 @@ ANY_CHAR'
               (setq phps-mode/STATE state)
               (setq phps-mode/state_stack state-stack)
               (setq phps-mode/lexer-states new-states)
               ;; TODO Should clear overlays after point of change here
               ;; (message "Rewinding lex to state: %s and stack: %s and 
states: %s and start: %s old tokens: %s" state state-stack new-states 
previous-token-start old-tokens)

reply via email to

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