aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.h
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2009-08-16 00:30:54 +0000
committernyamatongwe <devnull@localhost>2009-08-16 00:30:54 +0000
commit2ba263d420359bd3d529d2d32df0314b8253556d (patch)
treeb30b0d8020558f6fdcc0d92b0f5128fd07c59162 /src/Selection.h
parent1847111186e5808fc17d22327756250165a02bac (diff)
downloadscintilla-mirror-2ba263d420359bd3d529d2d32df0314b8253556d.tar.gz
Always copy rectangular selections in ascending order.
Diffstat (limited to 'src/Selection.h')
-rw-r--r--src/Selection.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Selection.h b/src/Selection.h
index c18e5c02e..b0c286866 100644
--- a/src/Selection.h
+++ b/src/Selection.h
@@ -98,6 +98,9 @@ struct SelectionRange {
bool operator ==(const SelectionRange &other) const {
return caret == other.caret && anchor == other.anchor;
}
+ bool operator <(const SelectionRange &other) const {
+ return caret < other.caret || ((caret == other.caret) && (anchor < other.anchor));
+ }
void Reset() {
anchor.Reset();
caret.Reset();
@@ -161,6 +164,9 @@ public:
void RemoveDuplicates();
void RotateMain();
bool Tentative() const { return tentativeMain; }
+ std::vector<SelectionRange> RangesCopy() const {
+ return ranges;
+ }
};
#ifdef SCI_NAMESPACE