From c5dedff99f306588a7217d40a4281db7d1baffaa Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 11 Oct 2018 09:29:05 +1100 Subject: Add SCI_SETCOMMANDEVENTS API to allow turning off command events. This can reduce the time taken to fold a document by half. --- 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 f7f1f7e2c..71b6d9e5e 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2001,9 +2001,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