diff options
author | nyamatongwe <unknown> | 2009-10-11 05:45:27 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2009-10-11 05:45:27 +0000 |
commit | e7ac3b0ca3221f791b522e5a215f303c08f046ab (patch) | |
tree | 4f30f2ce2102366bac2f682c64ee6ccd5dc905bd /src/Selection.cxx | |
parent | 310b2e88d1f4ded7dce3abd6b08b2f3b8fc2faeb (diff) | |
download | scintilla-mirror-e7ac3b0ca3221f791b522e5a215f303c08f046ab.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(); } |