From 083b30ff1783f7b6c803d2c5489ddcd5d0dce14f Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 11 Oct 2018 09:29:05 +1100 Subject: Backport: Add SCI_SETCOMMANDEVENTS API to allow turning off command events. This can reduce the time taken to fold a document by half. Backport of changeset 7110:09c647755bed. --- win32/ScintillaWin.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'win32') diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index f81c89173..b5b47dbd2 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -1972,9 +1972,11 @@ void ScintillaWin::NotifyChange() { } void ScintillaWin::NotifyFocus(bool focus) { - ::SendMessage(::GetParent(MainHWND()), WM_COMMAND, - MAKELONG(GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), - reinterpret_cast(MainHWND())); + if (commandEvents) { + ::SendMessage(::GetParent(MainHWND()), WM_COMMAND, + MAKELONG(GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), + reinterpret_cast(MainHWND())); + } Editor::NotifyFocus(focus); } -- cgit v1.2.3