aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2003-10-20 10:29:41 +0000
committernyamatongwe <devnull@localhost>2003-10-20 10:29:41 +0000
commit5359bcb66f781fc1499734ec563f9a4f71945600 (patch)
tree7ec8603f66206fb19f6fca23f6925cdef22cea12
parentfba3fe2455442cdd367721c5ba89e6a3a5a9c2e0 (diff)
downloadscintilla-mirror-5359bcb66f781fc1499734ec563f9a4f71945600.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.
-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());