aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2007-01-26 00:52:44 +0000
committernyamatongwe <unknown>2007-01-26 00:52:44 +0000
commitd29a135b12ff4f664bca3e18777dbdfce74c2551 (patch)
treec696f5e46a571cf81441ee99974f3ac40107bc9c /src/Document.cxx
parent31e9679fd022236ad54303ce6a92573455e1eee8 (diff)
downloadscintilla-mirror-d29a135b12ff4f664bca3e18777dbdfce74c2551.tar.gz
Avoid trying to style when inside a modification as that styling will be thrown away.
Diffstat (limited to 'src/Document.cxx')
-rw-r--r--src/Document.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Document.cxx b/src/Document.cxx
index 6e8d2cc44..400769635 100644
--- a/src/Document.cxx
+++ b/src/Document.cxx
@@ -1320,15 +1320,14 @@ bool Document::SetStyles(int length, char *styles) {
}
}
-bool Document::EnsureStyledTo(int pos) {
- if (pos > GetEndStyled()) {
+void Document::EnsureStyledTo(int pos) {
+ if ((enteredCount == 0) && (pos > GetEndStyled())) {
IncrementStyleClock();
// Ask the watchers to style, and stop as soon as one responds.
for (int i = 0; pos > GetEndStyled() && i < lenWatchers; i++) {
watchers[i].watcher->NotifyStyleNeeded(this, watchers[i].userData, pos);
}
}
- return pos <= GetEndStyled();
}
void Document::IncrementStyleClock() {