diff options
author | nyamatongwe <devnull@localhost> | 2000-04-23 23:02:52 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2000-04-23 23:02:52 +0000 |
commit | e7e0244ee5f2dc3cee896ef695efbaf9a47ac519 (patch) | |
tree | 1333ea2f269ba51377731942af211d3c2211dd9e /src/Editor.cxx | |
parent | 7755da7142f88f1d9695fea500f9ae3f86d202ba (diff) | |
download | scintilla-mirror-e7e0244ee5f2dc3cee896ef695efbaf9a47ac519.tar.gz |
Fixing problems with fold information degrading when lines inserted and
removed.
New notifications before inserting and deleting text.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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); } |