aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.h
diff options
context:
space:
mode:
authornyamatongwe <unknown>2009-10-11 05:45:27 +0000
committernyamatongwe <unknown>2009-10-11 05:45:27 +0000
commite7ac3b0ca3221f791b522e5a215f303c08f046ab (patch)
tree4f30f2ce2102366bac2f682c64ee6ccd5dc905bd /src/Selection.h
parent310b2e88d1f4ded7dce3abd6b08b2f3b8fc2faeb (diff)
downloadscintilla-mirror-e7ac3b0ca3221f791b522e5a215f303c08f046ab.tar.gz
Fix bug #2871358 where left or right key with rectangular selection
moved to a left or right of main selection rather than before or after rectangular selection.
Diffstat (limited to 'src/Selection.h')
-rw-r--r--src/Selection.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Selection.h b/src/Selection.h
index b0c286866..d064af642 100644
--- a/src/Selection.h
+++ b/src/Selection.h
@@ -74,6 +74,12 @@ struct SelectionSegment {
bool Empty() const {
return start == end;
}
+ void Extend(SelectionPosition p) {
+ if (start > p)
+ start = p;
+ if (end < p)
+ end = p;
+ }
};
struct SelectionRange {
@@ -141,6 +147,7 @@ public:
int MainCaret() const;
int MainAnchor() const;
SelectionRange &Rectangular();
+ SelectionSegment Limits() const;
size_t Count() const;
size_t Main() const;
void SetMain(size_t r);