diff options
author | nyamatongwe <devnull@localhost> | 2009-10-11 05:45:27 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2009-10-11 05:45:27 +0000 |
commit | 1aa01f95869bae53f52a501b7970977c6963f8cc (patch) | |
tree | 4f30f2ce2102366bac2f682c64ee6ccd5dc905bd /src/Selection.cxx | |
parent | bc6c607302bf51775d73b30758c465ab6b872ddf (diff) | |
download | scintilla-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.cxx | 13 |
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(); } |