diff --git a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h index 57838cd3a..840cae547 100644 --- a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h +++ b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h @@ -206,7 +206,10 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV //scnNotification->nmhdr.hwndFrom = hwndNpp; //scnNotification->nmhdr.idFrom = 0; - + #define NPPN_FILEJUSTOPENED (NPPN_FIRST + 4) // To notify plugins that the current file is just opened + //scnNotification->nmhdr.code = NPPN_FILEJUSTOPENED; + //scnNotification->nmhdr.hwndFrom = hwndNpp; + //scnNotification->nmhdr.idFrom = 0; diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 60d18d2d9..ac6ca6043 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -472,6 +472,14 @@ bool Notepad_plus::doOpen(const char *fileName, bool isReadOnly) _linkTriggered = true; _isDocModifing = false; setWorkingDir(longFileName); + + // Notify plugins that current file is just opened + SCNotification scnN; + scnN.nmhdr.code = NPPN_FILEJUSTOPENED; + scnN.nmhdr.hwndFrom = _hSelf; + scnN.nmhdr.idFrom = 0; + _pluginsManager.notify(&scnN); + return true; } else