diff options
author | nyamatongwe <devnull@localhost> | 2007-01-26 00:52:44 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2007-01-26 00:52:44 +0000 |
commit | ce33c9e6add556342a071b571de3226110e4ac01 (patch) | |
tree | c696f5e46a571cf81441ee99974f3ac40107bc9c /src | |
parent | 65489b1e3980eafd8e197fe4fa696119914ac8c1 (diff) | |
download | scintilla-mirror-ce33c9e6add556342a071b571de3226110e4ac01.tar.gz |
Avoid trying to style when inside a modification as that styling will be thrown away.
Diffstat (limited to 'src')
-rw-r--r-- | src/Document.cxx | 5 | ||||
-rw-r--r-- | src/Document.h | 2 |
2 files changed, 3 insertions, 4 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() { diff --git a/src/Document.h b/src/Document.h index 730b033f3..aaa19e493 100644 --- a/src/Document.h +++ b/src/Document.h @@ -212,7 +212,7 @@ public: bool SetStyleFor(int length, char style); bool SetStyles(int length, char *styles); int GetEndStyled() { return endStyled; } - bool EnsureStyledTo(int pos); + void EnsureStyledTo(int pos); int GetStyleClock() { return styleClock; } void IncrementStyleClock(); |