aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2003-10-20 10:29:41 +0000
committernyamatongwe <unknown>2003-10-20 10:29:41 +0000
commit87644e62b90925fc4f6c01681ee842bd9f733266 (patch)
tree7ec8603f66206fb19f6fca23f6925cdef22cea12 /src
parentf81506b78f26637b67a74320167a75a6df8d4e71 (diff)
downloadscintilla-mirror-87644e62b90925fc4f6c01681ee842bd9f733266.tar.gz
Fixes to wrapping code.
Priority wrap can wrap first line in document. Selection margin drawn after wrapping. Check modification for wrap performed after line heights scrolled because of line insertion or deletion.
Diffstat (limited to 'src')
-rw-r--r--src/Editor.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index e07eed027..235821748 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2523,14 +2523,12 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
needUpdateUI = false;
}
- PaintSelMargin(surfaceWindow, rcArea);
-
// Call priority lines wrap on a window of lines which are likely
// to rendered with the following paint (that is wrap the visible
// lines first).
int startLineToWrap = cs.DocFromDisplay(topLine) - 5;
if (startLineToWrap < 0)
- startLineToWrap = 0;
+ startLineToWrap = -1;
if (WrapLines(false, startLineToWrap)) {
// The wrapping process has changed the height of some lines so
// abandon this paint for a complete repaint.
@@ -2541,6 +2539,8 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
}
PLATFORM_ASSERT(pixmapSelPattern->Initialised());
+ PaintSelMargin(surfaceWindow, rcArea);
+
PRectangle rcRightMargin = rcClient;
rcRightMargin.left = rcRightMargin.right - vs.rightMarginWidth;
if (rcArea.Intersects(rcRightMargin)) {
@@ -3454,7 +3454,6 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) {
if (paintState == painting) {
CheckForChangeOutsidePaint(Range(mh.position, mh.position + mh.length));
}
- CheckModificationForWrap(mh);
if (mh.modificationType & SC_MOD_CHANGESTYLE) {
if (paintState == notPainting) {
if (mh.position < pdoc->LineStart(topLine)) {
@@ -3495,6 +3494,7 @@ void Editor::NotifyModified(Document*, DocModification mh, void *) {
} else {
cs.DeleteLines(lineOfPos, -mh.linesAdded);
}
+ CheckModificationForWrap(mh);
// Avoid scrolling of display if change before current display
if (mh.position < posTopLine) {
int newTop = Platform::Clamp(topLine + mh.linesAdded, 0, MaxScrollPos());