aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Editor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r--src/Editor.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index 9821b1195..953cae81a 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2662,12 +2662,16 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) {
}
if (paintState == notPainting && !CanDeferToLastStep(mh)) {
- QueueIdleWork(WorkNeeded::workStyle, pdoc->Length());
+ if (SynchronousStylingToVisible()) {
+ QueueIdleWork(WorkNeeded::workStyle, pdoc->Length());
+ }
Redraw();
}
} else {
if (paintState == notPainting && mh.length && !CanEliminate(mh)) {
- QueueIdleWork(WorkNeeded::workStyle, mh.position + mh.length);
+ if (SynchronousStylingToVisible()) {
+ QueueIdleWork(WorkNeeded::workStyle, mh.position + mh.length);
+ }
InvalidateRange(mh.position, mh.position + mh.length);
}
}
@@ -5068,7 +5072,7 @@ void Editor::StyleToPositionInView(Sci::Position pos) {
}
Sci::Position Editor::PositionAfterMaxStyling(Sci::Position posMax, bool scrolling) const {
- if ((idleStyling == SC_IDLESTYLING_NONE) || (idleStyling == SC_IDLESTYLING_AFTERVISIBLE)) {
+ if (SynchronousStylingToVisible()) {
// Both states do not limit styling
return posMax;
}