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

Commit 1830d4f

Browse files
committed
Merge branch 'master' into topic/editorgateway_v1
2 parents 240b74f + 681e053 commit 1830d4f

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
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
}

Demo Plugin/NppManagedPluginDemo/DllExport/NppPlugin.DllExport.targets

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
LibToolDllPath="$(DevEnvDir)"
2222
SdkPath="$(SDK40ToolsPath)"/>
2323

24-
<Copy SourceFiles="$(TargetPath)" DestinationFolder="C:\Program Files (x86)\Notepad++\plugins\" ContinueOnError="false" />
24+
<Copy
25+
SourceFiles="$(TargetPath)"
26+
DestinationFolder="C:\Program Files (x86)\Notepad++\plugins\"
27+
Condition="Exists('C:\Program Files (x86)\Notepad++\plugins\')"
28+
ContinueOnError="false" />
2529
</Target>
2630
</Project>

Visual Studio Project Template C#/DllExport/NppPlugin.DllExport.targets

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
LibToolDllPath="$(DevEnvDir)"
2222
SdkPath="$(SDK40ToolsPath)"/>
2323

24-
<Copy SourceFiles="$(TargetPath)" DestinationFolder="C:\Program Files (x86)\Notepad++\plugins\" ContinueOnError="false" />
24+
<Copy
25+
SourceFiles="$(TargetPath)"
26+
DestinationFolder="C:\Program Files (x86)\Notepad++\plugins\"
27+
Condition="Exists('C:\Program Files (x86)\Notepad++\plugins\')"
28+
ContinueOnError="false" />
2529
</Target>
2630
</Project>

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)