diff options
author | Neil <nyamatongwe@gmail.com> | 2017-01-19 21:31:35 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-01-19 21:31:35 +1100 |
commit | 21bc1deb34f2ba2a4514d54efa3b6d2a25a83deb (patch) | |
tree | e87c1a888f9daa0912bc71b43b4cf18941856348 /src | |
parent | 0cccd1e6285dce657e7106cc3ea0cd090a772860 (diff) | |
download | scintilla-mirror-21bc1deb34f2ba2a4514d54efa3b6d2a25a83deb.tar.gz |
Bug [#1896]. Avoid unnecessary unfolding when a deletion does not include a line
end.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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; |