diff options
author | nyamatongwe <unknown> | 2008-05-28 12:01:58 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2008-05-28 12:01:58 +0000 |
commit | 54f78a2b11aa91a44ef3b90a5f040bde9657147a (patch) | |
tree | eee1fef8cf5987332ebdb094878ad774f876ebf5 | |
parent | 89107d858a94604ef8ad2cbd983b01e7cb90e874 (diff) | |
download | scintilla-mirror-54f78a2b11aa91a44ef3b90a5f040bde9657147a.tar.gz |
Patch from Eric Promislow makes #{ work as a fold comment.
-rw-r--r-- | src/LexRuby.cxx | 3 |
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) { |