aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Selection.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-06-16 13:11:03 +1000
committerNeil <nyamatongwe@gmail.com>2015-06-16 13:11:03 +1000
commitdfa87cc18cc453a12113a53671c75c8461f437d8 (patch)
treea1469092ecb9c9066eb00e29604115e3db76ef1d /src/Selection.cxx
parentf1bd8d5f4ac8a741df0b10000f09345752f6e6af (diff)
downloadscintilla-mirror-dfa87cc18cc453a12113a53671c75c8461f437d8.tar.gz
Clean up some selection operations. Commonly when changing selection modes,
all of the selection needs to be redrawn so that is implmeneted in Editor::InvalidateWholeSelection. Any extra selections should be discarded with only the main remaining so that is Selection::DropAdditionalRanges. Some default parameters led to less clarity so they no longer have default values. Both Editor::MovePositionTo methods always returned 0 which was ignored so they are now void. Some variables were made const.
Diffstat (limited to 'src/Selection.cxx')
-rw-r--r--src/Selection.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Selection.cxx b/src/Selection.cxx
index 52ed5774e..f4308b130 100644
--- a/src/Selection.cxx
+++ b/src/Selection.cxx
@@ -343,6 +343,10 @@ void Selection::DropSelection(size_t r) {
}
}
+void Selection::DropAdditionalRanges() {
+ SetSelection(RangeMain());
+}
+
void Selection::TentativeSelection(SelectionRange range) {
if (!tentativeMain) {
rangesSaved = ranges;