diff options
| author | nyamatongwe <devnull@localhost> | 2002-03-01 07:24:01 +0000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2002-03-01 07:24:01 +0000 |
| commit | a7f65a490650406b2e73037bd2c9600070246a75 (patch) | |
| tree | a72be70f7d69e487c10dad8c990da4611cf793ba /src/Document.h | |
| parent | 196284f04800adeaf9c3f8d4538d51350b13279a (diff) | |
| download | scintilla-mirror-a7f65a490650406b2e73037bd2c9600070246a75.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); } |
