From 18815de8ac5c8ced32d0568f89c4ba6222ccb657 Mon Sep 17 00:00:00 2001 From: xomx Date: Mon, 8 Apr 2024 12:53:26 +0200 Subject: [PATCH] Fix multi-edit resists escape after typing issue Add Multi-Edit mode canceling by Esc possibility Fix #14649, close #14956 --- PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp index cf3adc8eb..f51cd23df 100644 --- a/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScintillaComponent/ScintillaEditView.cpp @@ -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(execute(SCI_GETMAINSELECTION, 0, 0)); + int caret = static_cast(execute(SCI_GETSELECTIONNCARET, selection, 0)); + execute(SCI_SETSELECTION, caret, caret); + break; + } default: break;