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. --- 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 b21dbb102..ec78479b9 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -2058,7 +2058,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