diff options
author | nyamatongwe <devnull@localhost> | 2001-08-15 08:20:20 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2001-08-15 08:20:20 +0000 |
commit | 8837fdaaa2eaa0c61bf5d02e628b9b3f9a320ff0 (patch) | |
tree | 994b7aeabed12fe2b298c85a37047bbd1c748495 /src/KeyWords.cxx | |
parent | 43f0db3fba1641bfd5742880c9341df9097b02a2 (diff) | |
download | scintilla-mirror-8837fdaaa2eaa0c61bf5d02e628b9b3f9a320ff0.tar.gz |
Fixed up length to fold and initial style perturbed when making fold start
one line early.
Diffstat (limited to 'src/KeyWords.cxx')
-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); } |