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 /qt/ScintillaEditBase/ScintillaQt.cpp | |
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 'qt/ScintillaEditBase/ScintillaQt.cpp')
-rw-r--r-- | qt/ScintillaEditBase/ScintillaQt.cpp | 10 |
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); } |