From a09e6de4962957bbde5b2a9110bd1cc0aba5fb7f Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Wed, 13 Nov 2019 14:56:20 +0100 Subject: [PATCH] + chg: ESC Key clears active selection (before exiting Notepad3) --- src/Notepad3.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Notepad3.c b/src/Notepad3.c index 5327aa372..16dba0220 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -5696,6 +5696,12 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) _END_UNDO_ACTION_ s_bIndicMultiEdit = false; } + else if (!SciCall_IsSelectionEmpty()) { + _BEGIN_UNDO_ACTION_ + EditSetSelectionEx(Globals.hwndEdit, iCurPos, iCurPos, -1, -1); + _END_UNDO_ACTION_ + break; + } else if (Settings.EscFunction == 1) { SendMessage(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0); break; @@ -5704,12 +5710,6 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) CloseApplication(true); break; } - - if (!SciCall_IsSelectionEmpty()) { - _BEGIN_UNDO_ACTION_ - EditSetSelectionEx(Globals.hwndEdit, iCurPos, iCurPos, -1, -1); - _END_UNDO_ACTION_ - } else { EditSetSelectionEx(Globals.hwndEdit, iCurPos, iCurPos, -1, -1); }