diff options
author | nyamatongwe <unknown> | 2010-06-26 11:41:48 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2010-06-26 11:41:48 +0000 |
commit | bfbb9c2448820b005e463fc30a684b724bda5ec5 (patch) | |
tree | 06b9656612fa543d1051615109df78c4fc72a741 | |
parent | f568437cfd24a6227d6210080e3610fdf55663aa (diff) | |
download | scintilla-mirror-bfbb9c2448820b005e463fc30a684b724bda5ec5.tar.gz |
Improve responsiveness in wrap mode by only lexing text that is about
to be wrapped rather than lexing the whole document at once.
-rw-r--r-- | src/Editor.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 8a0ad64c4..9761c10c9 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1406,8 +1406,6 @@ bool Editor::WrapLines(bool fullWrap, int priorityWrapLineStart) { rcTextArea.left = vs.fixedColumnWidth; rcTextArea.right -= vs.rightMarginWidth; wrapWidth = rcTextArea.Width(); - // Ensure all of the document is styled. - pdoc->EnsureStyledTo(pdoc->Length()); RefreshStyleData(); AutoSurface surface(this); if (surface) { @@ -1428,6 +1426,9 @@ bool Editor::WrapLines(bool fullWrap, int priorityWrapLineStart) { lastLineToWrap = wrapEnd; } // else do a fullWrap. + // Ensure all lines being wrapped are styled. + pdoc->EnsureStyledTo(pdoc->LineEnd(lastLineToWrap)); + // Platform::DebugPrintf("Wraplines: full = %d, priorityStart = %d (wrapping: %d to %d)\n", fullWrap, priorityWrapLineStart, lineToWrap, lastLineToWrap); // Platform::DebugPrintf("Pending wraps: %d to %d\n", wrapStart, wrapEnd); while (lineToWrap < lastLineToWrap) { |