Skip to content

Commit

Permalink
scintilla: Ruby: Highlight keyword-style arguments correctly - fixes #…
Browse files Browse the repository at this point in the history
…522

rn=

(integrated from master branch change 9.2.1-231-ge9bcc68 by Mitchell <mitchellb@activestate.com>)
  • Loading branch information
mitchell-as committed Aug 14, 2015
1 parent d19b232 commit 371c76b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion contrib/patches/scintilla/copy/lexers/LexRuby.cxx
Expand Up @@ -425,7 +425,17 @@ static bool isHashRocketSuccessorColon(int i, Accessor &styler) {
}
}
}
return (ch == ',' || ch == '{');

// Check for keyword-style arguments in Ruby 1.9+ method calls.
if (actual_style(styler.StyleAt(pos)) == SCE_RB_IDENTIFIER) {
while (--pos > 0) {
if (actual_style(styler.StyleAt(pos)) != SCE_RB_IDENTIFIER) {
return styler[pos] == '.';
}
}
}

return (ch == ',' || ch == '{' || ch == '(');
}

// Look at chars up to but not including endPos
Expand Down

0 comments on commit 371c76b

Please sign in to comment.