Fix multi-edit resists escape after typing issue

Add Multi-Edit mode canceling by Esc possibility

Fix #14649, close #14956
This commit is contained in:
xomx 2024-04-08 12:53:26 +02:00 committed by Don Ho
parent e0bb723700
commit 18815de8ac

View File

@ -643,6 +643,14 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
// Solution suggested by Neil Hodgson. See:
// https://sourceforge.net/p/scintilla/bugs/2412/
break;
case VK_ESCAPE:
{
int selection = static_cast<int>(execute(SCI_GETMAINSELECTION, 0, 0));
int caret = static_cast<int>(execute(SCI_GETSELECTIONNCARET, selection, 0));
execute(SCI_SETSELECTION, caret, caret);
break;
}
default:
break;