From 21bc1deb34f2ba2a4514d54efa3b6d2a25a83deb Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 19 Jan 2017 21:31:35 +1100 Subject: Bug [#1896]. Avoid unnecessary unfolding when a deletion does not include a line end. --- src/Editor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3