diff options
author | nyamatongwe <unknown> | 2002-03-01 07:24:01 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-03-01 07:24:01 +0000 |
commit | a38426717abbb32d1f44e57a77151c3e070c943e (patch) | |
tree | a72be70f7d69e487c10dad8c990da4611cf793ba /src/Document.h | |
parent | b10a306583751875611d1cb9e538065dfb89f4de (diff) | |
download | scintilla-mirror-a38426717abbb32d1f44e57a77151c3e070c943e.tar.gz |
Fixed problem where brace highlights were remembered in line layout cache.
Diffstat (limited to 'src/Document.h')
-rw-r--r-- | src/Document.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Document.h b/src/Document.h index 8affe294c..941ad79cc 100644 --- a/src/Document.h +++ b/src/Document.h @@ -37,6 +37,7 @@ public: return (start != invalidPosition) && (end != invalidPosition); } + // Is the position within the range? bool Contains(Position pos) const { if (start < end) { return (pos >= start && pos <= end); @@ -45,6 +46,15 @@ public: } } + // Is the character after pos within the range? + bool ContainsCharacter(Position pos) const { + if (start < end) { + return (pos >= start && pos < end); + } else { + return (pos < start && pos >= end); + } + } + bool Contains(Range other) const { return Contains(other.start) && Contains(other.end); } |