aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2016-01-05 18:24:37 +1100
committerNeil <nyamatongwe@gmail.com>2016-01-05 18:24:37 +1100
commitc27477ed450161a1abd859c5256ff97de15b9e91 (patch)
tree6cc7f77f4d55396b00ad2dfdb108c7a44c47ac24 /src/Editor.cxx
parentbc0b0e80309336f321e3febf68ec8d0832a2f7e7 (diff)
downloadscintilla-mirror-c27477ed450161a1abd859c5256ff97de15b9e91.tar.gz
Fix infinite loop with both wrap and idle styling to end turned on.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 29799534e..08248a3d9 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -4886,17 +4886,13 @@ void Editor::Tick() {
}
bool Editor::Idle() {
+ bool needWrap = Wrapping() && wrapPending.NeedsWrap();
- bool idleDone;
-
- bool wrappingDone = !Wrapping();
-
- if (!wrappingDone) {
+ if (needWrap) {
// Wrap lines during idle.
WrapLines(wsIdle);
// No more wrapping
- if (!wrapPending.NeedsWrap())
- wrappingDone = true;
+ needWrap = wrapPending.NeedsWrap();
} else if (needIdleStyling) {
IdleStyling();
}
@@ -4906,7 +4902,7 @@ bool Editor::Idle() {
// false will stop calling this idle function until SetIdle() is
// called again.
- idleDone = wrappingDone && !needIdleStyling; // && thatDone && theOtherThingDone...
+ const bool idleDone = !needWrap && !needIdleStyling; // && thatDone && theOtherThingDone...
return !idleDone;
}