From 5068b02e1f2ef2c0e05063498b01fb36d4f4a57c Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 26 Jul 2007 07:28:36 +0000 Subject: Added notification for changing line state and use it to redraw if a line state change overruns the end of painting. --- src/Editor.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 9d9b4b4f2..187503256 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3731,6 +3731,15 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) { if (paintState == painting) { CheckForChangeOutsidePaint(Range(mh.position, mh.position + mh.length)); } + if (mh.modificationType & SC_MOD_CHANGELINESTATE) { + if (paintState == painting) { + CheckForChangeOutsidePaint( + Range(pdoc->LineStart(mh.line), pdoc->LineStart(mh.line+1))); + } else { + // Could check that change is before last visible line. + Redraw(); + } + } if (mh.modificationType & (SC_MOD_CHANGESTYLE|SC_MOD_CHANGEINDICATOR)) { if (mh.modificationType & SC_MOD_CHANGESTYLE) { pdoc->IncrementStyleClock(); -- cgit v1.2.3