From f1eb7da396f7a856006c15254216b5867ea23bc9 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 19 Apr 2007 13:21:08 +0000 Subject: Optimized indicator changing with separate SC_MOD_CHANGEINDICATOR notification flag. --- src/Editor.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 6f381a8ef..3a7a00f8e 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3831,8 +3831,10 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { if (paintState == painting) { CheckForChangeOutsidePaint(Range(mh.position, mh.position + mh.length)); } - if (mh.modificationType & SC_MOD_CHANGESTYLE) { - pdoc->IncrementStyleClock(); + if (mh.modificationType & (SC_MOD_CHANGESTYLE|SC_MOD_CHANGEINDICATOR)) { + if (mh.modificationType & SC_MOD_CHANGESTYLE) { + pdoc->IncrementStyleClock(); + } if (paintState == notPainting) { if (mh.position < pdoc->LineStart(topLine)) { // Styling performed before this view @@ -3841,7 +3843,9 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { InvalidateRange(mh.position, mh.position + mh.length); } } - llc.Invalidate(LineLayout::llCheckTextAndStyle); + if (mh.modificationType & SC_MOD_CHANGESTYLE) { + llc.Invalidate(LineLayout::llCheckTextAndStyle); + } } else { // Move selection and brace highlights if (mh.modificationType & SC_MOD_INSERTTEXT) { @@ -3925,7 +3929,7 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { // If client wants to see this modification if (mh.modificationType & modEventMask) { - if ((mh.modificationType & SC_MOD_CHANGESTYLE) == 0) { + if ((mh.modificationType & (SC_MOD_CHANGESTYLE|SC_MOD_CHANGEINDICATOR)) == 0) { // Real modification made to text of document. NotifyChange(); // Send EN_CHANGE } -- cgit v1.2.3