From ce33c9e6add556342a071b571de3226110e4ac01 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 26 Jan 2007 00:52:44 +0000 Subject: Avoid trying to style when inside a modification as that styling will be thrown away. --- src/Document.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Document.cxx') 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() { -- cgit v1.2.3