This repository was archived by the owner on Jan 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Demo Plugin/NppManagedPluginDemo
Visual Studio Project Template C# Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 ( ) ;
You can’t perform that action at this time.
0 commit comments