From 88ab035bd1811b97d6dbd789ebe2f3157864ebee Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 18 Jun 2013 12:18:25 +1000 Subject: Determine more accurately whether painting was abandoned by styling and so decrease consequent line wrapping work. --- src/Editor.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Editor.cxx') diff --git a/src/Editor.cxx b/src/Editor.cxx index 8b25b1fe1..f2e4c81b7 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3543,6 +3543,8 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { return; // Scroll bars may have changed so need redraw RefreshPixMaps(surfaceWindow); + paintAbandonedByStyling = false; + StyleToPositionInView(PositionAfterArea(rcArea)); PRectangle rcClient = GetClientRectangle(); @@ -3558,7 +3560,6 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) { ypos += screenLinePaintFirst * vs.lineHeight; int yposScreen = screenLinePaintFirst * vs.lineHeight; - bool paintAbandonedByStyling = paintState == paintAbandoned; if (NotifyUpdateUI()) { RefreshStyleData(); RefreshPixMaps(surfaceWindow); @@ -6852,6 +6853,7 @@ void Editor::CheckForChangeOutsidePaint(Range r) { if (!PaintContains(rcRange)) { AbandonPaint(); + paintAbandonedByStyling = true; } } } -- cgit v1.2.3