Skip to content

Commit

Permalink
Fix 'jumping cursor' problem
Browse files Browse the repository at this point in the history
Regression from the previous commit.
Refs mooz#31.
  • Loading branch information
dgutov committed Jan 8, 2012
1 parent 5d5a7cc commit 04fbc13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js2-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -7327,9 +7327,9 @@ leaving a statement, an expression, or a function definition."
(max-specpdl-size (max max-specpdl-size 3000))
(case-fold-search nil)
ast)
(or buf (setq buf (current-buffer)))
(message nil) ; clear any error message from previous parse
(with-current-buffer buf
(save-excursion
(when buf (set-buffer buf))
(setq js2-scanned-comments nil
js2-parsed-errors nil
js2-parsed-warnings nil
Expand Down

0 comments on commit 04fbc13

Please sign in to comment.