aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
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 /win32
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 'win32')
-rw-r--r--win32/ScintillaWin.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index f81c89173..b5b47dbd2 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -1972,9 +1972,11 @@ void ScintillaWin::NotifyChange() {
}
void ScintillaWin::NotifyFocus(bool focus) {
- ::SendMessage(::GetParent(MainHWND()), WM_COMMAND,
- MAKELONG(GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS),
- reinterpret_cast<LPARAM>(MainHWND()));
+ if (commandEvents) {
+ ::SendMessage(::GetParent(MainHWND()), WM_COMMAND,
+ MAKELONG(GetCtrlID(), focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS),
+ reinterpret_cast<LPARAM>(MainHWND()));
+ }
Editor::NotifyFocus(focus);
}