aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.h
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-03-01 07:24:01 +0000
committernyamatongwe <unknown>2002-03-01 07:24:01 +0000
commita38426717abbb32d1f44e57a77151c3e070c943e (patch)
treea72be70f7d69e487c10dad8c990da4611cf793ba /src/Document.h
parentb10a306583751875611d1cb9e538065dfb89f4de (diff)
downloadscintilla-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.h10
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);
}