diff options
author | nyamatongwe <unknown> | 2001-08-15 08:20:20 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-08-15 08:20:20 +0000 |
commit | 633ed21b3f1532dc1554d1a62fc86371db643661 (patch) | |
tree | 994b7aeabed12fe2b298c85a37047bbd1c748495 /src | |
parent | 3a2756ef0f4291829a456d25e182b31bf2d164f1 (diff) | |
download | scintilla-mirror-633ed21b3f1532dc1554d1a62fc86371db643661.tar.gz |
Fixed up length to fold and initial style perturbed when making fold start
one line early.
Diffstat (limited to 'src')
-rw-r--r-- | src/KeyWords.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/KeyWords.cxx b/src/KeyWords.cxx index d954a64e2..0728580fd 100644 --- a/src/KeyWords.cxx +++ b/src/KeyWords.cxx @@ -73,7 +73,13 @@ void LexerModule::Fold(unsigned int startPos, int lengthDoc, int initStyle, // Move back one line in case deletion wrecked current line fold state if (lineCurrent > 0) { lineCurrent--; - startPos = styler.LineStart(lineCurrent); + int newStartPos = styler.LineStart(lineCurrent); + lengthDoc += startPos - newStartPos; + startPos = newStartPos; + initStyle = 0; + if (startPos > 0) { + initStyle = styler.StyleAt(startPos - 1); + } } fnFolder(startPos, lengthDoc, initStyle, keywordlists, styler); } |