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 | 932a9ff8d406af31d3db0161ca0fad5148d6f0a7 (patch) | |
| tree | c95b522e4beb6e773c5582fad2393a71348080cd | |
| parent | 06e078155fb90796be0824fbc980b90c034ed21f (diff) | |
| download | scintilla-mirror-932a9ff8d406af31d3db0161ca0fad5148d6f0a7.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; | 
