Skip to content

Commit ff82c29

Browse files
committed
XBrackets Lite 1.3.1
1 parent 93dc8f3 commit ff82c29

21 files changed

+1682
-969
lines changed

XBrackets/XBrackets.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
***********************************************
2-
* XBrackets Lite for Notepad++ 7.5.x (and above)
3-
* by DV, Jan 2009 - Feb 2018
2+
* XBrackets Lite for Notepad++ 8.x.x (and above)
3+
* by DV, Jan 2009 - Feb 2022
44
***********************************************
55

66
XBrackets Lite allows to autocomplete brackets ([{""}]) i.e. it inserts
@@ -34,6 +34,11 @@ Examples:
3434
* History *
3535
*************
3636

37+
v1.3.1 - Feb 2022
38+
-----------------
39+
* updated to Notepad++ 8.2.2
40+
41+
3742
v1.3.0 - Feb 2018
3843
-----------------
3944
* 64-bit version added

XBrackets/XBrackets_VC2017.sln

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28307.1321
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "XBrackets", "XBrackets_VC2017.vcxproj", "{A74E350F-747A-471F-8B36-C8F97FA2A1AF}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Win32 = Debug|Win32
11+
Debug|x64 = Debug|x64
12+
Release|Win32 = Release|Win32
13+
Release|x64 = Release|x64
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{A74E350F-747A-471F-8B36-C8F97FA2A1AF}.Debug|Win32.ActiveCfg = Debug|Win32
17+
{A74E350F-747A-471F-8B36-C8F97FA2A1AF}.Debug|Win32.Build.0 = Debug|Win32
18+
{A74E350F-747A-471F-8B36-C8F97FA2A1AF}.Debug|x64.ActiveCfg = Debug|x64
19+
{A74E350F-747A-471F-8B36-C8F97FA2A1AF}.Debug|x64.Build.0 = Debug|x64
20+
{A74E350F-747A-471F-8B36-C8F97FA2A1AF}.Release|Win32.ActiveCfg = Release|Win32
21+
{A74E350F-747A-471F-8B36-C8F97FA2A1AF}.Release|Win32.Build.0 = Release|Win32
22+
{A74E350F-747A-471F-8B36-C8F97FA2A1AF}.Release|x64.ActiveCfg = Release|x64
23+
{A74E350F-747A-471F-8B36-C8F97FA2A1AF}.Release|x64.Build.0 = Release|x64
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
EndGlobal

XBrackets/XBrackets_VC2017.vcxproj

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug|x64">
9+
<Configuration>Debug</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Release|Win32">
13+
<Configuration>Release</Configuration>
14+
<Platform>Win32</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<ProjectName>XBrackets</ProjectName>
23+
<ProjectGuid>{A74E350F-747A-471F-8B36-C8F97FA2A1AF}</ProjectGuid>
24+
<RootNamespace>XBrackets</RootNamespace>
25+
<Keyword>Win32Proj</Keyword>
26+
</PropertyGroup>
27+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
29+
<ConfigurationType>DynamicLibrary</ConfigurationType>
30+
<PlatformToolset>v141_xp</PlatformToolset>
31+
<UseOfMfc>false</UseOfMfc>
32+
<CharacterSet>Unicode</CharacterSet>
33+
<WholeProgramOptimization>true</WholeProgramOptimization>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
36+
<ConfigurationType>DynamicLibrary</ConfigurationType>
37+
<PlatformToolset>v141</PlatformToolset>
38+
<UseOfMfc>false</UseOfMfc>
39+
<CharacterSet>Unicode</CharacterSet>
40+
<WholeProgramOptimization>true</WholeProgramOptimization>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
43+
<ConfigurationType>DynamicLibrary</ConfigurationType>
44+
<PlatformToolset>v141_xp</PlatformToolset>
45+
<CharacterSet>Unicode</CharacterSet>
46+
</PropertyGroup>
47+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
48+
<ConfigurationType>DynamicLibrary</ConfigurationType>
49+
<PlatformToolset>v141</PlatformToolset>
50+
<CharacterSet>Unicode</CharacterSet>
51+
</PropertyGroup>
52+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
53+
<ImportGroup Label="ExtensionSettings">
54+
</ImportGroup>
55+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
56+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
57+
</ImportGroup>
58+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
59+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
60+
</ImportGroup>
61+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
62+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
63+
</ImportGroup>
64+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
65+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
66+
</ImportGroup>
67+
<PropertyGroup Label="UserMacros" />
68+
<PropertyGroup>
69+
<XPDeprecationWarning>false</XPDeprecationWarning>
70+
</PropertyGroup>
71+
<PropertyGroup>
72+
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
73+
</PropertyGroup>
74+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
75+
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
76+
<IntDir>$(Configuration)\</IntDir>
77+
<LinkIncremental>true</LinkIncremental>
78+
</PropertyGroup>
79+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
80+
<LinkIncremental>true</LinkIncremental>
81+
</PropertyGroup>
82+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
83+
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
84+
<IntDir>$(Configuration)\</IntDir>
85+
<LinkIncremental>false</LinkIncremental>
86+
</PropertyGroup>
87+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
88+
<LinkIncremental>false</LinkIncremental>
89+
</PropertyGroup>
90+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
91+
<ClCompile>
92+
<Optimization>Disabled</Optimization>
93+
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;XBRACKETS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
94+
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
95+
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
96+
<PrecompiledHeader />
97+
<WarningLevel>Level3</WarningLevel>
98+
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
99+
</ClCompile>
100+
<Link>
101+
<GenerateDebugInformation>true</GenerateDebugInformation>
102+
<SubSystem>Windows</SubSystem>
103+
<TargetMachine>MachineX86</TargetMachine>
104+
</Link>
105+
</ItemDefinitionGroup>
106+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
107+
<ClCompile>
108+
<Optimization>Disabled</Optimization>
109+
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;XBRACKETS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
110+
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
111+
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
112+
<PrecompiledHeader>
113+
</PrecompiledHeader>
114+
<WarningLevel>Level3</WarningLevel>
115+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
116+
</ClCompile>
117+
<Link>
118+
<GenerateDebugInformation>true</GenerateDebugInformation>
119+
<SubSystem>Windows</SubSystem>
120+
</Link>
121+
</ItemDefinitionGroup>
122+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
123+
<ClCompile>
124+
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;XBRACKETS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
125+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
126+
<PrecompiledHeader />
127+
<WarningLevel>Level3</WarningLevel>
128+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
129+
</ClCompile>
130+
<Link>
131+
<GenerateDebugInformation>true</GenerateDebugInformation>
132+
<SubSystem>Windows</SubSystem>
133+
<OptimizeReferences>true</OptimizeReferences>
134+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
135+
<TargetMachine>MachineX86</TargetMachine>
136+
</Link>
137+
</ItemDefinitionGroup>
138+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
139+
<ClCompile>
140+
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;XBRACKETS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
141+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
142+
<PrecompiledHeader>
143+
</PrecompiledHeader>
144+
<WarningLevel>Level3</WarningLevel>
145+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
146+
</ClCompile>
147+
<Link>
148+
<GenerateDebugInformation>true</GenerateDebugInformation>
149+
<SubSystem>Windows</SubSystem>
150+
<OptimizeReferences>true</OptimizeReferences>
151+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
152+
</Link>
153+
</ItemDefinitionGroup>
154+
<ItemGroup>
155+
<ClCompile Include="src\core\NppMessager.cpp" />
156+
<ClCompile Include="src\core\NppPlugin.cpp" />
157+
<ClCompile Include="src\core\NppPluginMenu.cpp" />
158+
<ClCompile Include="src\core\SciMessager.cpp" />
159+
<ClCompile Include="src\Main.cpp" />
160+
<ClCompile Include="src\SettingsDlg.cpp" />
161+
<ClCompile Include="src\XBrackets.cpp" />
162+
<ClCompile Include="src\XBracketsMenu.cpp" />
163+
<ClCompile Include="src\XBracketsOptions.cpp" />
164+
</ItemGroup>
165+
<ItemGroup>
166+
<ClInclude Include="src\core\base.h" />
167+
<ClInclude Include="src\core\NppMessager.h" />
168+
<ClInclude Include="src\core\NppPlugin.h" />
169+
<ClInclude Include="src\core\NppPluginMenu.h" />
170+
<ClInclude Include="src\core\SciMessager.h" />
171+
<ClInclude Include="src\resource.h" />
172+
<ClInclude Include="src\SettingsDlg.h" />
173+
<ClInclude Include="src\XBrackets.h" />
174+
<ClInclude Include="src\XBracketsMenu.h" />
175+
<ClInclude Include="src\XBracketsOptions.h" />
176+
</ItemGroup>
177+
<ItemGroup>
178+
<ResourceCompile Include="src\XBrackets.rc" />
179+
</ItemGroup>
180+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
181+
<ImportGroup Label="ExtensionTargets">
182+
</ImportGroup>
183+
</Project>
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<ClCompile Include="src\Main.cpp">
19+
<Filter>Source Files</Filter>
20+
</ClCompile>
21+
<ClCompile Include="src\core\NppMessager.cpp">
22+
<Filter>Source Files</Filter>
23+
</ClCompile>
24+
<ClCompile Include="src\core\NppPlugin.cpp">
25+
<Filter>Source Files</Filter>
26+
</ClCompile>
27+
<ClCompile Include="src\core\NppPluginMenu.cpp">
28+
<Filter>Source Files</Filter>
29+
</ClCompile>
30+
<ClCompile Include="src\core\SciMessager.cpp">
31+
<Filter>Source Files</Filter>
32+
</ClCompile>
33+
<ClCompile Include="src\SettingsDlg.cpp">
34+
<Filter>Source Files</Filter>
35+
</ClCompile>
36+
<ClCompile Include="src\XBrackets.cpp">
37+
<Filter>Source Files</Filter>
38+
</ClCompile>
39+
<ClCompile Include="src\XBracketsMenu.cpp">
40+
<Filter>Source Files</Filter>
41+
</ClCompile>
42+
<ClCompile Include="src\XBracketsOptions.cpp">
43+
<Filter>Source Files</Filter>
44+
</ClCompile>
45+
</ItemGroup>
46+
<ItemGroup>
47+
<ClInclude Include="src\core\base.h">
48+
<Filter>Header Files</Filter>
49+
</ClInclude>
50+
<ClInclude Include="src\core\NppMessager.h">
51+
<Filter>Header Files</Filter>
52+
</ClInclude>
53+
<ClInclude Include="src\core\NppPlugin.h">
54+
<Filter>Header Files</Filter>
55+
</ClInclude>
56+
<ClInclude Include="src\core\NppPluginMenu.h">
57+
<Filter>Header Files</Filter>
58+
</ClInclude>
59+
<ClInclude Include="src\resource.h">
60+
<Filter>Header Files</Filter>
61+
</ClInclude>
62+
<ClInclude Include="src\core\SciMessager.h">
63+
<Filter>Header Files</Filter>
64+
</ClInclude>
65+
<ClInclude Include="src\SettingsDlg.h">
66+
<Filter>Header Files</Filter>
67+
</ClInclude>
68+
<ClInclude Include="src\XBrackets.h">
69+
<Filter>Header Files</Filter>
70+
</ClInclude>
71+
<ClInclude Include="src\XBracketsMenu.h">
72+
<Filter>Header Files</Filter>
73+
</ClInclude>
74+
<ClInclude Include="src\XBracketsOptions.h">
75+
<Filter>Header Files</Filter>
76+
</ClInclude>
77+
</ItemGroup>
78+
<ItemGroup>
79+
<ResourceCompile Include="src\XBrackets.rc">
80+
<Filter>Resource Files</Filter>
81+
</ResourceCompile>
82+
</ItemGroup>
83+
</Project>

XBrackets/src/XBrackets.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "XBrackets.h"
22
#include "XBracketsOptions.h"
3-
#include "core/npp_stuff/resource.h"
3+
#include "core/npp_files/resource.h"
44

55

66
// can be _T(x), but _T(x) may be incompatible with ANSI mode
@@ -309,7 +309,7 @@ void CXBrackets::OnSciCharAdded(const int ch)
309309

310310
if ( nRightBracketType != tbtNone )
311311
{
312-
INT_PTR pos = sciMsgr.getCurrentPos() - 1;
312+
Sci_Position pos = sciMsgr.getCurrentPos() - 1;
313313

314314
if ( pos == m_nAutoRightBracketPos )
315315
{
@@ -407,7 +407,7 @@ void CXBrackets::UpdateFileType() // <-- call it when the plugin becomes active!
407407
m_nFileType = getFileType(m_bSupportedFileType);
408408
}
409409

410-
static void getEscapedPrefixPos(const INT_PTR nOffset, INT_PTR* pnPos, int* pnLen)
410+
static void getEscapedPrefixPos(const Sci_Position nOffset, Sci_Position* pnPos, int* pnLen)
411411
{
412412
if ( nOffset > CXBrackets::MAX_ESCAPED_PREFIX )
413413
{
@@ -440,8 +440,8 @@ void CXBrackets::AutoBracketsFunc(int nBracketType)
440440
}
441441

442442
CSciMessager sciMsgr(m_nppMsgr.getCurrentScintillaWnd());
443-
INT_PTR nEditPos = sciMsgr.getSelectionStart();
444-
INT_PTR nEditEndPos = sciMsgr.getSelectionEnd();
443+
Sci_Position nEditPos = sciMsgr.getSelectionStart();
444+
Sci_Position nEditEndPos = sciMsgr.getSelectionEnd();
445445

446446
// is something selected?
447447
if ( nEditEndPos != nEditPos )
@@ -527,7 +527,7 @@ void CXBrackets::AutoBracketsFunc(int nBracketType)
527527
if ( bPrevCharOK && bNextCharOK && g_opt.m_bBracketsSkipEscaped )
528528
{
529529
char szPrefix[MAX_ESCAPED_PREFIX + 2];
530-
INT_PTR pos;
530+
Sci_Position pos;
531531
int len; // len <= MAX_ESCAPED_PREFIX, so 'int' is always enough
532532

533533
getEscapedPrefixPos(nEditPos - 1, &pos, &len);

XBrackets/src/XBrackets.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ class CXBrackets : public CNppPlugin
4141
CXBracketsMenu m_PluginMenu;
4242

4343
// internal vars
44-
INT_PTR m_nAutoRightBracketPos;
45-
int m_nFileType;
46-
bool m_bSupportedFileType;
44+
Sci_Position m_nAutoRightBracketPos;
45+
int m_nFileType;
46+
bool m_bSupportedFileType;
4747

4848
public:
4949
CXBrackets();

0 commit comments

Comments
 (0)