aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/ScintillaQt.cpp
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 /qt/ScintillaEditBase/ScintillaQt.cpp
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 'qt/ScintillaEditBase/ScintillaQt.cpp')
-rw-r--r--qt/ScintillaEditBase/ScintillaQt.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/qt/ScintillaEditBase/ScintillaQt.cpp b/qt/ScintillaEditBase/ScintillaQt.cpp
index cf4709a0e..8aebb9521 100644
--- a/qt/ScintillaEditBase/ScintillaQt.cpp
+++ b/qt/ScintillaEditBase/ScintillaQt.cpp
@@ -380,10 +380,12 @@ void ScintillaQt::NotifyChange()
void ScintillaQt::NotifyFocus(bool focus)
{
- emit command(
- Platform::LongFromTwoShorts
- (GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS),
- reinterpret_cast<sptr_t>(wMain.GetID()));
+ if (commandEvents) {
+ emit command(
+ Platform::LongFromTwoShorts
+ (GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS),
+ reinterpret_cast<sptr_t>(wMain.GetID()));
+ }
Editor::NotifyFocus(focus);
}