diff options
author | Neil <nyamatongwe@gmail.com> | 2023-11-06 07:59:06 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2023-11-06 07:59:06 +1100 |
commit | 1272f93ac3afd3892d04364fdc5abba56161951d (patch) | |
tree | 24a1fdc65b970786b829d503e50cd2b74f48ce08 /src/Editor.cxx | |
parent | 26b60d88b6d848f3ba55ca046852e079be5fe3c6 (diff) | |
download | scintilla-mirror-1272f93ac3afd3892d04364fdc5abba56161951d.tar.gz |
Extract DropSelection into a method so it can be reused.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 527c9b47c..d498cc0d7 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4557,6 +4557,12 @@ Window::Cursor Editor::GetMarginCursor(Point pt) const noexcept { return Window::Cursor::reverseArrow; } +void Editor::DropSelection(size_t part) { + sel.DropSelection(part); + ContainerNeedsUpdate(Update::Selection); + Redraw(); +} + void Editor::TrimAndSetSelection(Sci::Position currentPos_, Sci::Position anchor_) { sel.TrimSelection(SelectionRange(currentPos_, anchor_)); SetSelection(currentPos_, anchor_); @@ -8702,9 +8708,7 @@ sptr_t Editor::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { return SelectionFromPoint(PointFromParameters(wParam, lParam)); case Message::DropSelectionN: - sel.DropSelection(wParam); - ContainerNeedsUpdate(Update::Selection); - Redraw(); + DropSelection(wParam); break; case Message::SetMainSelection: |