diff options
author | nyamatongwe <devnull@localhost> | 2003-10-16 13:12:36 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2003-10-16 13:12:36 +0000 |
commit | 4a940a4aadb96ff947543c7e579add09652f5ffa (patch) | |
tree | 794989d63cbf02dda84ee5866b27c5563992c362 | |
parent | e5bc157729ba7d4ea645f00eefb585bc09350581 (diff) | |
download | scintilla-mirror-4a940a4aadb96ff947543c7e579add09652f5ffa.tar.gz |
When multiple lines added, wrap all the added lines not just the top 2.
-rw-r--r-- | src/Editor.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index c8efe0a6e..0a54ba2aa 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1410,8 +1410,9 @@ void Editor::NeedWrapping(int docLineStartWrapping, int docLineEndWrapping) { docLastLineToWrap = pdoc->LinesTotal(); } // Wrap lines during idle. - if (docLastLineToWrap != docLineLastWrapped) + if (docLastLineToWrap != docLineLastWrapped) { SetIdle(true); + } } // Check if wrapping needed and perform any needed wrapping. @@ -3408,7 +3409,7 @@ void Editor::CheckModificationForWrap(DocModification mh) { llc.Invalidate(LineLayout::llCheckTextAndStyle); if (wrapState != eWrapNone) { int lineDoc = pdoc->LineFromPosition(mh.position); - if (mh.linesAdded == 0) { + if (mh.linesAdded <= 0) { AutoSurface surface(this); AutoLineLayout ll(llc, RetrieveLineLayout(lineDoc)); if (surface && ll) { @@ -3417,11 +3418,9 @@ void Editor::CheckModificationForWrap(DocModification mh) { NeedWrapping(lineDoc - 1, lineDoc + 1); Redraw(); } - } else { - NeedWrapping(lineDoc, lineDoc + 1); } } else { - NeedWrapping(lineDoc, lineDoc + 1); + NeedWrapping(lineDoc, lineDoc + 1 + mh.linesAdded); } } } |