aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/ScintillaGTK.cxx
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 /gtk/ScintillaGTK.cxx
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 'gtk/ScintillaGTK.cxx')
-rw-r--r--gtk/ScintillaGTK.cxx7
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);
}