aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2007-05-31 23:30:43 +0000
committernyamatongwe <unknown>2007-05-31 23:30:43 +0000
commitcac98b923422b91839f7c285a9b78ea282cd6f0a (patch)
treeda064eb9af3e9800f992e1dc9903c826c92de196 /src
parent1ac62f75e51df6fd1521c0bb7633ff20a128e169 (diff)
downloadscintilla-mirror-cac98b923422b91839f7c285a9b78ea282cd6f0a.tar.gz
Patch from Istvan Szollosi fixes bad folding for Pascal and GAP
when fold affecting text is not separated by whitespace.
Diffstat (limited to 'src')
-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;