You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using js2-mode together with whitespace-mode to highlight the part of the line that is over 80 characters, and it seems like the syntax highlighting gets messed up somehow. This doesn’t happen with js-mode or other major modes.
Steps to reproduce:
Start emacs with -Q and evaluate the following lines (assuming js2-mode is installed)
Now open a new .js file, activate js2-mode, and write a long syntactically correct line (long enough that the end becomes blue)
var xxxxxxxxxxxxxxx = 3;
Now add // at the beginning of the line, and note that only the beginning of the line got updated to a red foreground color, the end of the line still uses the old foreground color.
Add a space at the end of the line and remove it: it now updates the foreground color of the end of the line to be red too.
Remove //, it only updates the foreground color of the beginning of the line, the end of the line stays red.
In js-mode or for instance emacs-lisp-mode it works fine, the foreground color gets updated immediately on the whole line.
The text was updated successfully, but these errors were encountered:
By "red foreground", you mean the foreground of the comment face? If so, I see it.
This might be a fundamental limitation in how font-lock's font-lock-face mapping works. Or it might just require the js2-mode parser to be triggered from syntax-propertize-function. IOW, I see no quick fixes for now.
I’m using
js2-mode
together withwhitespace-mode
to highlight the part of the line that is over 80 characters, and it seems like the syntax highlighting gets messed up somehow. This doesn’t happen withjs-mode
or other major modes.Steps to reproduce:
Start emacs with
-Q
and evaluate the following lines (assuming js2-mode is installed)Now open a new
.js
file, activatejs2-mode
, and write a long syntactically correct line (long enough that the end becomes blue)Now add
//
at the beginning of the line, and note that only the beginning of the line got updated to a red foreground color, the end of the line still uses the old foreground color.Add a space at the end of the line and remove it: it now updates the foreground color of the end of the line to be red too.
Remove
//
, it only updates the foreground color of the beginning of the line, the end of the line stays red.In
js-mode
or for instanceemacs-lisp-mode
it works fine, the foreground color gets updated immediately on the whole line.The text was updated successfully, but these errors were encountered: