From 9a24b646f899734342a240964db61bb07ea41648 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 28 Feb 2002 02:52:43 +0000 Subject: Line layout cache feature added. --- src/Document.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/Document.cxx') diff --git a/src/Document.cxx b/src/Document.cxx index 76695efe5..3d3e5a51d 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -36,6 +36,7 @@ Document::Document() { stylingMask = 0; SetWordChars(0); endStyled = 0; + styleClock = 0; enteredCount = 0; enteredReadOnlyCount = 0; tabInChars = 8; @@ -1115,6 +1116,12 @@ void Document::SetStyles(int length, char *styles) { } bool Document::EnsureStyledTo(int pos) { + if (pos > GetEndStyled()) { + styleClock++; + if (styleClock > 0x100000) { + styleClock = 0; + } + } // 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); -- cgit v1.2.3