diff options
author | Colomban Wendling <ban@herbesfolles.org> | 2014-07-29 15:10:20 +0200 |
---|---|---|
committer | Colomban Wendling <ban@herbesfolles.org> | 2014-07-29 15:10:20 +0200 |
commit | e6b90e5b551f84aac17106873b6f6303fd2c19b0 (patch) | |
tree | 4bd7c36ffea5120778aade69590edfb7a997a751 | |
parent | 14eda5339120d84f75532f75c80d426e3e685a0d (diff) | |
download | scintilla-mirror-e6b90e5b551f84aac17106873b6f6303fd2c19b0.tar.gz |
Bug [#1627]. Allow FIDs as Ruby symbol literals
-rw-r--r-- | lexers/LexRuby.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx index f818d3d47..0fdbab7d1 100644 --- a/lexers/LexRuby.cxx +++ b/lexers/LexRuby.cxx @@ -1260,7 +1260,11 @@ static void ColouriseRbDoc(unsigned int startPos, int length, int initStyle, } else if (state == SCE_RB_CLASS_VAR || state == SCE_RB_INSTANCE_VAR || state == SCE_RB_SYMBOL) { - if (!isSafeWordcharOrHigh(ch)) { + if (state == SCE_RB_SYMBOL && (ch == '!' || ch == '?') && chNext != '=') { + styler.ColourTo(i, state); + state = SCE_RB_DEFAULT; + preferRE = false; + } else if (!isSafeWordcharOrHigh(ch)) { styler.ColourTo(i - 1, state); redo_char(i, ch, chNext, chNext2, state); // pass by ref preferRE = false; |