diff options
author | nyamatongwe <unknown> | 2009-08-16 00:30:54 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2009-08-16 00:30:54 +0000 |
commit | 2a7cbb87174bbe0b3951525f5e76fdca05bba37b (patch) | |
tree | b30b0d8020558f6fdcc0d92b0f5128fd07c59162 /src/Selection.h | |
parent | 5f9e4940243c3fd634d1171e97f9a6d78580f185 (diff) | |
download | scintilla-mirror-2a7cbb87174bbe0b3951525f5e76fdca05bba37b.tar.gz |
Always copy rectangular selections in ascending order.
Diffstat (limited to 'src/Selection.h')
-rw-r--r-- | src/Selection.h | 6 |
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 |