From e7e0244ee5f2dc3cee896ef695efbaf9a47ac519 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 23 Apr 2000 23:02:52 +0000 Subject: Fixing problems with fold information degrading when lines inserted and removed. New notifications before inserting and deleting text. --- src/Editor.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 440cdeff1..e8e0f755c 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1599,6 +1599,11 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { } } } + if (mh.modificationType & SC_MOD_BEFOREINSERT) { + NotifyNeedShown(mh.position, 0); + } else if (mh.modificationType & SC_MOD_BEFOREDELETE) { + NotifyNeedShown(mh.position, mh.length); + } if (mh.linesAdded != 0) { // Update contraction state for inserted and removed lines @@ -1606,7 +1611,6 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { int lineOfPos = pdoc->LineFromPosition(mh.position); if (mh.linesAdded > 0) { cs.InsertLines(lineOfPos, mh.linesAdded); - NotifyNeedShown(mh.position, mh.length); } else { cs.DeleteLines(lineOfPos, -mh.linesAdded); } -- cgit v1.2.3