diff options
author | nyamatongwe <unknown> | 2002-02-11 02:15:56 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-02-11 02:15:56 +0000 |
commit | 059b5ea7391a9879a96921b256a185165e8ab2db (patch) | |
tree | 8fccbc9b0127de0aa755ebbef0a78b4ca1609bad /src/DocumentAccessor.cxx | |
parent | 537e81b993a0118c5c51018f5697ae4f5c1cc3bc (diff) | |
download | scintilla-mirror-059b5ea7391a9879a96921b256a185165e8ab2db.tar.gz |
Changes to tighten up styling beyond the bounds of the document.
May not be permanent.
Diffstat (limited to 'src/DocumentAccessor.cxx')
-rw-r--r-- | src/DocumentAccessor.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/DocumentAccessor.cxx b/src/DocumentAccessor.cxx index 76530e1de..f115f1930 100644 --- a/src/DocumentAccessor.cxx +++ b/src/DocumentAccessor.cxx @@ -80,6 +80,7 @@ int DocumentAccessor::SetLineState(int line, int state) { void DocumentAccessor::StartAt(unsigned int start, char chMask) { pdoc->StartStyling(start, chMask); + startPosStyling = start; } void DocumentAccessor::StartSegment(unsigned int pos) { @@ -103,6 +104,7 @@ void DocumentAccessor::ColourTo(unsigned int pos, int chAttr) { chFlags = 0; chAttr |= chFlags; for (unsigned int i = startSeg; i <= pos; i++) { + PLATFORM_ASSERT((startPosStyling + validLen) < Length()); styleBuf[validLen++] = static_cast<char>(chAttr); } } @@ -120,6 +122,7 @@ void DocumentAccessor::Flush() { if (validLen > 0) { pdoc->SetStyles(validLen, styleBuf); validLen = 0; + startPosStyling += validLen; } } |