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. --- cocoa/ScintillaCocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cocoa') diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index d88e0e3ed..1338a66fa 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -1969,7 +1969,7 @@ void ScintillaCocoa::NotifyChange() { //-------------------------------------------------------------------------------------------------- void ScintillaCocoa::NotifyFocus(bool focus) { - if (notifyProc != NULL) + if (commandEvents && notifyProc) notifyProc(notifyObj, WM_COMMAND, Platform::LongFromTwoShorts(static_cast(GetCtrlID()), (focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS)), (uintptr_t) this); -- cgit v1.2.3