+ chg: ESC Key clears active selection (before exiting Notepad3)

This commit is contained in:
Rainer Kottenhoff 2019-11-13 14:56:20 +01:00
parent 9c46d0540a
commit a09e6de496

View File

@ -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);
}