diff options
author | nyamatongwe <unknown> | 2013-06-18 12:18:25 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2013-06-18 12:18:25 +1000 |
commit | 71851f214226abf8bd20a5236bf6760dee4e5c11 (patch) | |
tree | 02d38c3760afe425463d75be474598e7cbfd2ac3 /src | |
parent | 93cdd91445de10f9fb5b0cce78d61a8afbf7b7a6 (diff) | |
download | scintilla-mirror-71851f214226abf8bd20a5236bf6760dee4e5c11.tar.gz |
Determine more accurately whether painting was abandoned by styling and so
decrease consequent line wrapping work.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 4 | ||||
-rw-r--r-- | src/Editor.h | 1 |
2 files changed, 4 insertions, 1 deletions
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; } } } diff --git a/src/Editor.h b/src/Editor.h index 86b6acd9e..b47bd24c0 100644 --- a/src/Editor.h +++ b/src/Editor.h @@ -238,6 +238,7 @@ protected: // ScintillaBase subclass needs access to much of Editor int theEdge; enum { notPainting, painting, paintAbandoned } paintState; + bool paintAbandonedByStyling; PRectangle rcPaint; bool paintingAllText; bool willRedrawAll; |