diff options
author | nyamatongwe <devnull@localhost> | 2013-06-18 12:18:25 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2013-06-18 12:18:25 +1000 |
commit | 88ab035bd1811b97d6dbd789ebe2f3157864ebee (patch) | |
tree | 139bddd78b0b1c8b74ed1bf5e7b8ae0a73c5b5d4 /src | |
parent | eff8ef7aeb6ff1db3ad02c5855b32d1a50a70b2c (diff) | |
download | scintilla-mirror-88ab035bd1811b97d6dbd789ebe2f3157864ebee.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; |