aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexRuby.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2010-12-09 23:22:44 +1100
committernyamatongwe <unknown>2010-12-09 23:22:44 +1100
commitd15d59fbf54fac4eeac55d4160d845cab8d0d0cd (patch)
treee79435da657aa9c967ccbacb178fcfd2e0916910 /lexers/LexRuby.cxx
parentd05dcb0422074dcef71295607e26808f7675dfce (diff)
downloadscintilla-mirror-d15d59fbf54fac4eeac55d4160d845cab8d0d0cd.tar.gz
Folding for Ruby here documents. Feature #3118224.
Diffstat (limited to 'lexers/LexRuby.cxx')
-rw-r--r--lexers/LexRuby.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx
index 22410848e..e6559261e 100644
--- a/lexers/LexRuby.cxx
+++ b/lexers/LexRuby.cxx
@@ -1729,7 +1729,13 @@ static void FoldRbDoc(unsigned int startPos, int length, int initStyle,
) {
levelCurrent++;
}
- }
+ } else if (style == SCE_RB_HERE_DELIM) {
+ if (styler.SafeGetCharAt(i-2) == '<' && styler.SafeGetCharAt(i-1) == '<') {
+ levelCurrent++;
+ } else if (styleNext == SCE_RB_DEFAULT) {
+ levelCurrent--;
+ }
+ }
if (atEOL) {
int lev = levelPrev;
if (visibleChars == 0 && foldCompact)