aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorColomban Wendling <ban@herbesfolles.org>2014-07-29 16:27:44 +0200
committerColomban Wendling <ban@herbesfolles.org>2014-07-29 16:27:44 +0200
commitcfecd76e44e08f41dab922f4438abe7f852da24d (patch)
tree4706b8226a90960f01fd787c845ccc019ad61272
parentcb6f0efb028b1d30198ac1ae58ce89e581e17768 (diff)
downloadscintilla-mirror-cfecd76e44e08f41dab922f4438abe7f852da24d.tar.gz
Allow identifier suffix = in Ruby symbol literals
See comments in bug [#1627] for some details.
-rw-r--r--lexers/LexRuby.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx
index b0b52fd77..e9b3cfb0e 100644
--- a/lexers/LexRuby.cxx
+++ b/lexers/LexRuby.cxx
@@ -1285,7 +1285,12 @@ 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 (state == SCE_RB_SYMBOL && (ch == '!' || ch == '?') && chNext != '=') {
+ if (state == SCE_RB_SYMBOL &&
+ // FIDs suffices '?' and '!'
+ (((ch == '!' || ch == '?') && chNext != '=') ||
+ // identifier suffix '='
+ (ch == '=' && (chNext != '~' && chNext != '>' &&
+ (chNext != '=' || chNext2 == '>'))))) {
styler.ColourTo(i, state);
state = SCE_RB_DEFAULT;
preferRE = false;