aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2007-05-31 23:30:43 +0000
committernyamatongwe <devnull@localhost>2007-05-31 23:30:43 +0000
commit664fee964e1f91132ebf07a4b122e59c1e932ea6 (patch)
treeda064eb9af3e9800f992e1dc9903c826c92de196
parent8b5449f2e32ef24b2acd48483f0f80fa5f1b215a (diff)
downloadscintilla-mirror-664fee964e1f91132ebf07a4b122e59c1e932ea6.tar.gz
Patch from Istvan Szollosi fixes bad folding for Pascal and GAP
when fold affecting text is not separated by whitespace.
-rw-r--r--src/LexGAP.cxx2
-rw-r--r--src/LexPascal.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/LexGAP.cxx b/src/LexGAP.cxx
index 1dba29d7f..6878ab76b 100644
--- a/src/LexGAP.cxx
+++ b/src/LexGAP.cxx
@@ -211,7 +211,7 @@ static void FoldGAPDoc( unsigned int startPos, int length, int initStyle, Word
styleNext = styler.StyleAt(i + 1);
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
- if (stylePrev == SCE_GAP_DEFAULT && style == SCE_GAP_KEYWORD) {
+ if (stylePrev != SCE_GAP_KEYWORD && style == SCE_GAP_KEYWORD) {
// Store last word start point.
lastStart = i;
}
diff --git a/src/LexPascal.cxx b/src/LexPascal.cxx
index 434f88d4f..fdd12c470 100644
--- a/src/LexPascal.cxx
+++ b/src/LexPascal.cxx
@@ -289,7 +289,7 @@ static void FoldPascalDoc(unsigned int startPos, int length, int initStyle, Word
styleNext = styler.StyleAt(i + 1);
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
- if (stylePrev == SCE_C_DEFAULT && style == SCE_C_WORD)
+ if (stylePrev != SCE_C_WORD && style == SCE_C_WORD)
{
// Store last word start point.
lastStart = i;