branch: externals/phps-mode commit 1af63142f3f17ff47944d321e02624657f1f3f68 Author: Christian Johansson <christ...@cvj.se> Commit: Christian Johansson <christ...@cvj.se>
Fixed incremental issue with new SDT based bookkeeping --- phps-mode-lex-analyzer.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el index fd285b79d9..5d691323b2 100644 --- a/phps-mode-lex-analyzer.el +++ b/phps-mode-lex-analyzer.el @@ -254,12 +254,10 @@ (setq phps-mode-lex-analyzer--nest-location-stack (nth 6 lex-result)) (setq phps-mode-lex-analyzer--parse-trail (nth 7 lex-result)) (setq phps-mode-lex-analyzer--parse-error (nth 8 lex-result)) - - ;; Save processed result - (setq phps-mode-lex-analyzer--processed-buffer-p t) (setq phps-mode-lex-analyzer--ast (nth 9 lex-result)) (setq phps-mode-lex-analyzer--imenu (nth 10 lex-result)) (setq phps-mode-lex-analyzer--bookkeeping (nth 11 lex-result)) + (setq phps-mode-lex-analyzer--processed-buffer-p t) (phps-mode-lex-analyzer--reset-imenu) (when (fboundp 'thread-yield) (thread-yield)) @@ -383,15 +381,15 @@ (setq phps-mode-lex-analyzer--nest-location-stack (nth 6 lex-result)) (setq phps-mode-lex-analyzer--parse-trail (nth 7 lex-result)) (setq phps-mode-lex-analyzer--parse-error (nth 8 lex-result)) + (setq phps-mode-lex-analyzer--ast (nth 9 lex-result)) + (setq phps-mode-lex-analyzer--imenu (nth 10 lex-result)) + (setq phps-mode-lex-analyzer--bookkeeping (nth 11 lex-result)) (phps-mode-debug-message (message "Incremental tokens: %s" phps-mode-lex-analyzer--tokens)) ;; Save processed result (setq phps-mode-lex-analyzer--processed-buffer-p t) - (setq phps-mode-lex-analyzer--ast (nth 9 lex-result)) - (setq phps-mode-lex-analyzer--imenu (nth 10 lex-result)) - (setq phps-mode-lex-analyzer--bookkeeping (nth 10 lex-result)) (phps-mode-lex-analyzer--reset-imenu) (when (fboundp 'thread-yield) (thread-yield)) @@ -608,6 +606,9 @@ (setq phps-mode-lex-analyzer--nest-location-stack nil) (setq phps-mode-lex-analyzer--parse-trail nil) (setq phps-mode-lex-analyzer--parse-error nil) + (setq phps-mode-lex-analyzer--ast nil) + (setq phps-mode-lex-analyzer--imenu nil) + (setq phps-mode-lex-analyzer--bookkeeping nil) ;; NOTE Starts are inclusive while ends are exclusive buffer locations