diff options
-rw-r--r-- | doc/ScintillaHistory.html | 1 | ||||
-rw-r--r-- | src/Editor.cxx | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 1236efd7d..58743678e 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -539,6 +539,7 @@ </li> <li> Fix folding inconsistency when fold header added above a folded part. + Avoid unnecessary unfolding when a deletion does not include a line end. <a href="http://sourceforge.net/p/scintilla/bugs/1896/">Bug #1896</a>. </li> <li> diff --git a/src/Editor.cxx b/src/Editor.cxx index 29f0681fd..a2b087046 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2611,10 +2611,10 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { if (pdoc->ContainsLineEnd(mh.text, mh.length) && (mh.position != pdoc->LineStart(lineOfPos))) endNeedShown = pdoc->LineStart(lineOfPos+1); } else if (mh.modificationType & SC_MOD_BEFOREDELETE) { - // Extend the need shown area over any folded lines + // If the deletion includes any EOL then we extend the need shown area. endNeedShown = mh.position + mh.length; int lineLast = pdoc->LineFromPosition(mh.position+mh.length); - for (int line = lineOfPos; line <= lineLast; line++) { + for (int line = lineOfPos + 1; line <= lineLast; line++) { const int lineMaxSubord = pdoc->GetLastChild(line, -1, -1); if (lineLast < lineMaxSubord) { lineLast = lineMaxSubord; |