diff options
author | nyamatongwe <unknown> | 2005-03-01 09:47:48 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2005-03-01 09:47:48 +0000 |
commit | aa086593bb28aa2e7fbeb818ab34b7111e61eb29 (patch) | |
tree | 3cd32c38079e694523a0f4560f294740055d5af5 | |
parent | 5b1bca578b13b67d7474a438479b414776f756ed (diff) | |
download | scintilla-mirror-aa086593bb28aa2e7fbeb818ab34b7111e61eb29.tar.gz |
Patch from Jan Martin Pettersen to ensure lexers only see the bits in each
style byte they are interested in and not of any other indicators added
by the container.
-rw-r--r-- | src/DocumentAccessor.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/DocumentAccessor.cxx b/src/DocumentAccessor.cxx index 738eca7a0..f479ce025 100644 --- a/src/DocumentAccessor.cxx +++ b/src/DocumentAccessor.cxx @@ -58,7 +58,8 @@ bool DocumentAccessor::Match(int pos, const char *s) { } char DocumentAccessor::StyleAt(int position) { - return pdoc->StyleAt(position); + // Mask off all bits which aren't in the 'mask'. + return static_cast<char>(pdoc->StyleAt(position) & mask); } int DocumentAccessor::GetLine(int position) { @@ -88,6 +89,8 @@ int DocumentAccessor::SetLineState(int line, int state) { } void DocumentAccessor::StartAt(unsigned int start, char chMask) { + // Store the mask specified for use with StyleAt. + mask = chMask; pdoc->StartStyling(start, chMask); startPosStyling = start; } |