diff options
author | ActiveState <unknown> | 2015-10-13 12:16:26 +1100 |
---|---|---|
committer | ActiveState <unknown> | 2015-10-13 12:16:26 +1100 |
commit | 715e7eed3523cb08dd1b92a4e838a09d807a730f (patch) | |
tree | 8715ac0293ccb335c6b2d69922c20a6f6624ba8b | |
parent | 4419a43db4d20837084480a93d64805c7cac703c (diff) | |
download | scintilla-mirror-715e7eed3523cb08dd1b92a4e838a09d807a730f.tar.gz |
Bug [#1765]. CoffeeScript lexer highlights ranges correctly.
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | lexers/LexCoffeeScript.cxx | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 2febf6e2e..f338b4a93 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -508,6 +508,10 @@ margin to a different width that the edit pane. </li> <li> + CoffeeScript lexer highlights ranges correctly. + <a href="http://sourceforge.net/p/scintilla/bugs/1765/">Bug #1765</a>. + </li> + <li> Optimise marker redrawing by only drawing affected lines when markers shown in the text. </li> <li> diff --git a/lexers/LexCoffeeScript.cxx b/lexers/LexCoffeeScript.cxx index 2c3a8802c..f32560016 100644 --- a/lexers/LexCoffeeScript.cxx +++ b/lexers/LexCoffeeScript.cxx @@ -252,6 +252,10 @@ static void ColouriseCoffeeScriptDoc(Sci_PositionU startPos, Sci_Position length } } else if (isoperator(static_cast<char>(sc.ch))) { sc.SetState(SCE_COFFEESCRIPT_OPERATOR); + // Handle '..' and '...' operators correctly. + if (sc.ch == '.') { + for (int i = 0; i < 2 && sc.chNext == '.'; i++, sc.Forward()) ; + } } } |