aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-01-30 23:32:31 +0000
committernyamatongwe <devnull@localhost>2010-01-30 23:32:31 +0000
commit355c9bde45e0516bb43e8ff17c8c606f68fcb5b9 (patch)
tree3cb7dc952cf37135f963373295430eda84b4f90e /src/Selection.cxx
parent2500ebc8eda4588b3a0cba45484470ea417afbde (diff)
downloadscintilla-mirror-355c9bde45e0516bb43e8ff17c8c606f68fcb5b9.tar.gz
Fix bug #2942131 Caret pos after rectagular delete.
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r--src/Selection.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx
index 566cb1074..2cdbe60f2 100644
--- a/src/Selection.cxx
+++ b/src/Selection.cxx
@@ -192,6 +192,14 @@ SelectionSegment Selection::Limits() const {
}
}
+SelectionSegment Selection::LimitsForRectangularElseMain() const {
+ if (IsRectangular()) {
+ return Limits();
+ } else {
+ return SelectionSegment(ranges[mainRange].caret, ranges[mainRange].anchor);
+ }
+}
+
size_t Selection::Count() const {
return ranges.size();
}