aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2005-11-29 21:58:41 +0000
committernyamatongwe <unknown>2005-11-29 21:58:41 +0000
commit77d7b0c68d1ae80fd9a3a77cb180ac48c47631f6 (patch)
tree93f36b9100972fad830b5adb4675620aab09bf11
parentbfc353c1c79b56980285637be3db7aa8d18beb9d (diff)
downloadscintilla-mirror-77d7b0c68d1ae80fd9a3a77cb180ac48c47631f6.tar.gz
Fixed assertion where painting a rectangular selection led to
multiple layouts being checked out of the cache.
-rw-r--r--src/Editor.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index ab7094112..21184d387 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2823,6 +2823,8 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
//ElapsedTime et;
if (lineDoc != lineDocPrevious) {
ll.Set(0);
+ // For rectangular selection this accesses the layout cache so should be after layout returned.
+ lineIterator.SetAt(lineDoc);
ll.Set(RetrieveLineLayout(lineDoc));
LayoutLine(lineDoc, surface, vs, ll, wrapWidth);
lineDocPrevious = lineDoc;
@@ -2834,7 +2836,6 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
ll->selStart = SelectionStart();
ll->selEnd = SelectionEnd();
} else {
- lineIterator.SetAt(lineDoc);
ll->selStart = lineIterator.startPos;
ll->selEnd = lineIterator.endPos;
}