Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit dee0a84

Browse files
committed
Bugfix Demo
there were differences in the two files UnmanagedExports.cs from Ufo's v0.7 pack that are now synched
1 parent ff7d37b commit dee0a84

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

Demo Plugin/NppManagedPluginDemo/Demo.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ static internal void SetToolBarIcon()
3232
Kbg.Demo.Namespace.Main.SetToolBarIcon();
3333
}
3434

35+
static internal void OnCharAdded(char newChar)
36+
{
37+
Kbg.Demo.Namespace.Main.doInsertHtmlCloseTag(newChar);
38+
}
39+
3540
internal static string PluginName { get { return Kbg.Demo.Namespace.Main.PluginName; }}
3641
}
3742
}

Visual Studio Project Template C#/UnmanagedExports.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static bool isUnicode()
1616
static void setInfo(NppData notepadPlusData)
1717
{
1818
PluginBase.nppData = notepadPlusData;
19-
Main.CommandMenuInit();
19+
Main.CommandMenuInit();
2020
}
2121

2222
[DllExport(CallingConvention = CallingConvention.Cdecl)]
@@ -50,6 +50,10 @@ static void beNotified(IntPtr notifyCode)
5050
PluginBase._funcItems.RefreshItems();
5151
Main.SetToolBarIcon();
5252
}
53+
else if (nc.nmhdr.code == (uint)SciMsg.SCN_CHARADDED)
54+
{
55+
Main.OnCharAdded((char)nc.ch);
56+
}
5357
else if (nc.nmhdr.code == (uint)NppMsg.NPPN_SHUTDOWN)
5458
{
5559
Main.PluginCleanUp();

0 commit comments

Comments
 (0)