From f383f22afc060b66f9c57213144f06b8cae7ccd4 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 10 Aug 2001 10:37:02 +0000 Subject: Folder processes last line of document now. Comments in column 0 are never headers. --- src/LexPython.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/LexPython.cxx') diff --git a/src/LexPython.cxx b/src/LexPython.cxx index 6c5eed148..ddff03e94 100644 --- a/src/LexPython.cxx +++ b/src/LexPython.cxx @@ -366,7 +366,7 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse // Process all characters to end of requested range or end of any triple quote // or comment that hangs over the end of the range - for (int i = startPos; i < lengthDoc && ((lineCurrent < maxLines) || prevQuote || prevComment); i++) { + for (int i = startPos; i < lengthDoc && ((lineCurrent <= maxLines) || prevQuote || prevComment); i++) { // Next character char ch = chNext; @@ -384,7 +384,8 @@ static void FoldPyDoc(unsigned int startPos, int length, int /*initStyle - unuse int quote_start = (quote && !prevQuote); int quote_continue = (quote && prevQuote); int comment = IsCommentLine(lineCurrent, styler); - int comment_start = (comment && !prevComment && IsCommentLine(lineNext, styler)); + int comment_start = (comment && !prevComment && + IsCommentLine(lineNext, styler) && (lev > SC_FOLDLEVELBASE)); int comment_continue = (comment && prevComment); if (quote_start) { -- cgit v1.2.3