diff options
author | Neil <nyamatongwe@gmail.com> | 2018-10-11 09:29:05 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-10-11 09:29:05 +1100 |
commit | c5dedff99f306588a7217d40a4281db7d1baffaa (patch) | |
tree | c1d9cda99aa3920b0a0dacdddec296ec893854c7 /gtk | |
parent | 7cb8abba8c1b026f3b9450f3e163e09357b49906 (diff) | |
download | scintilla-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 'gtk')
-rw-r--r-- | gtk/ScintillaGTK.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 6bcb1ae29..1df3ed4b9 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1076,9 +1076,10 @@ void ScintillaGTK::NotifyChange() { } void ScintillaGTK::NotifyFocus(bool focus) { - g_signal_emit(G_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], 0, - Platform::LongFromTwoShorts - (GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), PWidget(wMain)); + if (commandEvents) + g_signal_emit(G_OBJECT(sci), scintilla_signals[COMMAND_SIGNAL], 0, + Platform::LongFromTwoShorts + (GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS), PWidget(wMain)); Editor::NotifyFocus(focus); } |