aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-12-09 23:22:44 +1100
committernyamatongwe <devnull@localhost>2010-12-09 23:22:44 +1100
commitbcf4d2ea901e3e44b5b03a38af6a4b79435824e6 (patch)
treedf2a9596e7cf653294796886e787f2c436384a89
parent5b8202f4fe196285164a4d6b606493b02be177d8 (diff)
downloadscintilla-mirror-bcf4d2ea901e3e44b5b03a38af6a4b79435824e6.tar.gz
Folding for Ruby here documents. Feature #3118224.
-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)