From 8a3fe684b8bcdf60b10876391c698b89c29b866c Mon Sep 17 00:00:00 2001 From: ActiveState Date: Tue, 13 Oct 2015 12:16:26 +1100 Subject: Bug [#1765]. CoffeeScript lexer highlights ranges correctly. --- lexers/LexCoffeeScript.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lexers/LexCoffeeScript.cxx') 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(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()) ; + } } } -- cgit v1.2.3