+ chg: if activated, ESC will close/minimize program immediately w/o canceling selection/tooltip first.

This commit is contained in:
Rainer Kottenhoff 2018-12-03 15:25:29 +01:00
parent 8bec8b1890
commit cb17ec9f4d

View File

@ -5077,19 +5077,6 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
case CMD_ESCAPE:
if (SciCall_CallTipActive()) {
SciCall_CallTipCancel();
break;
}
if (SciCall_AutoCActive()) {
SciCall_AutoCCancel();
break;
}
if (!SciCall_IsSelectionEmpty()) {
DocPos const iCurPos = SciCall_GetCurrentPos();
EditSetSelectionEx(Globals.hwndEdit, iCurPos, iCurPos, -1, -1);
break;
}
if (Settings.EscFunction == 1) {
SendMessage(hwnd, WM_SYSCOMMAND, SC_MINIMIZE, 0);
}
@ -5097,6 +5084,16 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam)
PostMessage(hwnd, WM_CLOSE, 0, 0);
}
else {
if (SciCall_CallTipActive()) {
SciCall_CallTipCancel();
}
if (SciCall_AutoCActive()) {
SciCall_AutoCCancel();
}
if (!SciCall_IsSelectionEmpty()) {
DocPos const iCurPos = SciCall_GetCurrentPos();
EditSetSelectionEx(Globals.hwndEdit, iCurPos, iCurPos, -1, -1);
}
SciCall_Cancel();
}
break;