Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 23 additions & 4 deletions NppPluginDemo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#include "PluginDefinition.h"
#include "Notepad_plus_msgs.h"

extern FuncItem funcItem[nbFunc];
extern NppData nppData;
Expand Down Expand Up @@ -68,13 +69,31 @@ extern "C" __declspec(dllexport) FuncItem * getFuncsArray(int *nbF)

extern "C" __declspec(dllexport) void beNotified(SCNotification *notifyCode)
{
switch (notifyCode->nmhdr.code)
switch (notifyCode->nmhdr.code)
{
case NPPN_SHUTDOWN:
{
commandMenuCleanUp();
}
break;
break;

case NPPN_FILEOPENED:
OnFileOpened((UINT_PTR)notifyCode->nmhdr.idFrom);
break;

case NPPN_BUFFERACTIVATED:
OnBufferActivated((UINT_PTR)notifyCode->nmhdr.idFrom);
break;

case NPPN_FILEBEFORESAVE:
OnFileBeforeSave((UINT_PTR)notifyCode->nmhdr.idFrom);
break;

case NPPN_FILESAVED:
OnFileSaved((UINT_PTR)notifyCode->nmhdr.idFrom);
break;

case NPPN_FILECLOSED:
OnFileClosed((UINT_PTR)notifyCode->nmhdr.idFrom);
break;

default:
return;
Expand Down
Loading