aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Document.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Document.h')
-rw-r--r--src/Document.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Document.h b/src/Document.h
index d73715764..e2414bd36 100644
--- a/src/Document.h
+++ b/src/Document.h
@@ -43,6 +43,14 @@ public:
return (start != invalidPosition) && (end != invalidPosition);
}
+ Position First() const {
+ return (start <= end) ? start : end;
+ }
+
+ Position Last() const {
+ return (start > end) ? start : end;
+ }
+
// Is the position within the range?
bool Contains(Position pos) const {
if (start < end) {