diff options
| -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(); | 
