From 0d61b128bf58310c9f312f9140a0a87d6ec7a43f Mon Sep 17 00:00:00 2001 From: CennoxX Date: Mon, 6 Jun 2022 21:07:13 +0200 Subject: [PATCH] Prevent deletion of double selection of part --- src/Main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Main.cpp b/src/Main.cpp index a00a5fc..cffa332 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -562,11 +562,11 @@ LRESULT CALLBACK KeyboardProc(int ncode, WPARAM wparam, LPARAM lparam) { EditSelections(SimpleEdit(IsShiftPressed() ? SCI_LINEENDWRAPEXTEND : SCI_LINEENDWRAP)); return TRUE; } - else if (wparam == VK_BACK) { + else if (wparam == VK_BACK && editor.GetSelectionEmpty()) { EditSelections(SimpleEdit(SCI_DELETEBACK)); return TRUE; } - else if (wparam == VK_DELETE) { + else if (wparam == VK_DELETE && editor.GetSelectionEmpty()) { EditSelections(SimpleEdit(SCI_CLEAR)); return TRUE; }