aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-10-11 09:29:05 +1100
committerNeil <nyamatongwe@gmail.com>2018-10-11 09:29:05 +1100
commitc5dedff99f306588a7217d40a4281db7d1baffaa (patch)
treec1d9cda99aa3920b0a0dacdddec296ec893854c7 /cocoa
parent7cb8abba8c1b026f3b9450f3e163e09357b49906 (diff)
downloadscintilla-mirror-c5dedff99f306588a7217d40a4281db7d1baffaa.tar.gz
Add SCI_SETCOMMANDEVENTS API to allow turning off command events.
This can reduce the time taken to fold a document by half.
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/ScintillaCocoa.mm2
1 files changed, 1 insertions, 1 deletions
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<short>(GetCtrlID()),
(focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS)),
(uintptr_t) this);