aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2009-10-11 05:45:27 +0000
committernyamatongwe <devnull@localhost>2009-10-11 05:45:27 +0000
commit1aa01f95869bae53f52a501b7970977c6963f8cc (patch)
tree4f30f2ce2102366bac2f682c64ee6ccd5dc905bd /src/Selection.cxx
parentbc6c607302bf51775d73b30758c465ab6b872ddf (diff)
downloadscintilla-mirror-1aa01f95869bae53f52a501b7970977c6963f8cc.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.cxx')
-rw-r--r--src/Selection.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx
index 47d078675..566cb1074 100644
--- a/src/Selection.cxx
+++ b/src/Selection.cxx
@@ -179,6 +179,19 @@ SelectionRange &Selection::Rectangular() {
return rangeRectangular;
}
+SelectionSegment Selection::Limits() const {
+ if (ranges.empty()) {
+ return SelectionSegment();
+ } else {
+ SelectionSegment sr(ranges[0].anchor, ranges[0].caret);
+ for (size_t i=1; i<ranges.size(); i++) {
+ sr.Extend(ranges[i].anchor);
+ sr.Extend(ranges[i].caret);
+ }
+ return sr;
+ }
+}
+
size_t Selection::Count() const {
return ranges.size();
}