Skip to content

Commit f64554d

Browse files
committed
Make sure to filter out unwanted notifications
1 parent 8220e0e commit f64554d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

LuaScript.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ extern "C" __declspec(dllexport) void beNotified(SCNotification *notifyCode) {
166166
TCHAR fname[MAX_PATH];
167167
NotifyHeader nh = notifyCode->nmhdr;
168168

169+
// We only want notifications from Notepad++ and it's 2 scintilla handles
170+
if (nh.hwndFrom != nppData._nppHandle && nh.hwndFrom != nppData._scintillaMainHandle && nh.hwndFrom != nppData._scintillaSecondHandle)
171+
return;
172+
169173
switch (nh.code) {
170174
case SCN_CHARADDED:
171175
LuaExtension::Instance().OnChar(notifyCode->ch);

0 commit comments

Comments
 (0)