aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2008-05-28 12:01:58 +0000
committernyamatongwe <devnull@localhost>2008-05-28 12:01:58 +0000
commit002f6af7bec3604f84637d8c6112a67e21b15f8f (patch)
treeeee1fef8cf5987332ebdb094878ad774f876ebf5 /src
parent9f23bd370256f76ac7b83a4f099b296152df5e55 (diff)
downloadscintilla-mirror-002f6af7bec3604f84637d8c6112a67e21b15f8f.tar.gz
Patch from Eric Promislow makes #{ work as a fold comment.
Diffstat (limited to 'src')
-rw-r--r--src/LexRuby.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/LexRuby.cxx b/src/LexRuby.cxx
index 18e94d4d8..7cb0b95c1 100644
--- a/src/LexRuby.cxx
+++ b/src/LexRuby.cxx
@@ -1641,7 +1641,7 @@ static void FoldRbDoc(unsigned int startPos, int length, int initStyle,
if (foldComment && stylePrev != SCE_RB_COMMENTLINE) {
if (chNext == '{') {
levelCurrent++;
- } else if (chNext == '}') {
+ } else if (chNext == '}' && levelCurrent > 0) {
levelCurrent--;
}
}
@@ -1692,6 +1692,7 @@ static void FoldRbDoc(unsigned int startPos, int length, int initStyle,
visibleChars++;
buffer_ends_with_eol = false;
}
+ stylePrev = style;
}
// Fill in the real level of the next line, keeping the current flags as they will be filled in later
if (!buffer_ends_with_eol) {