From 2ba263d420359bd3d529d2d32df0314b8253556d Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 16 Aug 2009 00:30:54 +0000 Subject: Always copy rectangular selections in ascending order. --- src/Selection.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Selection.h') 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 RangesCopy() const { + return ranges; + } }; #ifdef SCI_NAMESPACE -- cgit v1.2.3