From 54f78a2b11aa91a44ef3b90a5f040bde9657147a Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 28 May 2008 12:01:58 +0000 Subject: Patch from Eric Promislow makes #{ work as a fold comment. --- src/LexRuby.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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) { -- cgit v1.2.3