aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk
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
commit083b30ff1783f7b6c803d2c5489ddcd5d0dce14f (patch)
treed28d0b4042348afcde28455406ca3cb69d11ab12 /gtk
parent00f3a3ba52bb03872758a300719622161b469faa (diff)
downloadscintilla-mirror-083b30ff1783f7b6c803d2c5489ddcd5d0dce14f.tar.gz
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.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/ScintillaGTK.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index 6a115994b..b1dbd9bfe 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -1075,9 +1075,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);
}