diff options
| author | Neil <nyamatongwe@gmail.com> | 2015-06-16 13:11:03 +1000 |
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2015-06-16 13:11:03 +1000 |
| commit | dcb4511f2297c3e66c210cc92d56ce03d94c4e8d (patch) | |
| tree | fa15138063282d0322d0b2195ee35e5b3a1a62c3 /src/Selection.cxx | |
| parent | 34f536937739b4c9a1e0c4aae611d3dc5f3be4db (diff) | |
| download | scintilla-mirror-dcb4511f2297c3e66c210cc92d56ce03d94c4e8d.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.cxx | 4 |
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; |
