aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Selection.h')
-rw-r--r--src/Selection.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Selection.h b/src/Selection.h
index fe6a1c464..94d6fc65e 100644
--- a/src/Selection.h
+++ b/src/Selection.h
@@ -51,6 +51,9 @@ public:
void Add(int increment) {
position = position + increment;
}
+ bool IsValid() const {
+ return position >= 0;
+ }
};
struct SelectionRange {
@@ -69,6 +72,7 @@ struct SelectionRange {
return anchor == caret;
}
int Length() const;
+ // int Width() const; // Like Length but takes virtual space into account
bool operator ==(const SelectionRange &other) const {
return caret == other.caret && anchor == other.anchor;
}