diff options
| author | nyamatongwe <devnull@localhost> | 2010-06-26 11:41:48 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2010-06-26 11:41:48 +0000 | 
| commit | 868cce0d1a4c856934a2380cb748782b11f95126 (patch) | |
| tree | 06b9656612fa543d1051615109df78c4fc72a741 /src | |
| parent | b7bd3a142cf507ac57171931209bd3cdf85f06ec (diff) | |
| download | scintilla-mirror-868cce0d1a4c856934a2380cb748782b11f95126.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.
Diffstat (limited to 'src')
| -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) { | 
