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

Commit e4e6465

Browse files
committed
fix: #294 3P is not compatible with notepad++ v8.4+
1 parent b87fa51 commit e4e6465

9 files changed

Lines changed: 1049 additions & 1002 deletions

File tree

.gitattributes

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# All text files should have the "lf" (Unix) line endings
2+
* text eol=lf
3+
4+
# Explicitly declare text files you want to always be normalized and converted
5+
# to native line endings on checkout.
6+
*.sln text
7+
*.yml text
8+
*.yaml text
9+
*.md text
10+
*.csproj text
11+
*.user text
12+
*.cs text
13+
*.manifest text
14+
*.txt text
15+
*.resx text
16+
*.json text
17+
*.p text
18+
*.xml text
19+
*.css text
20+
*.html text
21+
*.js text
22+
*.nuspec text
23+
24+
25+
# Text files that should be normalized to crlf
26+
*.ps1 text eol=crlf
27+
*.cmd text eol=crlf
28+
*.bat text eol=crlf
29+
30+
# Binary files that should not be normalized or diffed
31+
32+
*.jar binary
33+
*.exe binary
34+
*.dll binary
35+
*.pdb binary
36+
*.pfx binary
37+
*.snk binary
38+
39+
*.png binary
40+
*.gif binary
41+
*.jpg binary
42+
*.bmp binary
43+
*.ico binary
44+
45+
*.chm binary
46+
*.7z binary
47+
*.zip binary
48+
49+
*.pptx binary
50+
*.xlsx binary
51+

3PA/MainFeatures/Config.cs

Lines changed: 918 additions & 918 deletions
Large diffs are not rendered by default.

3PA/NppCore/NppLang.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,14 @@ public NppLangs() {
104104
}
105105

106106
// from directory userDefineLangs/
107-
if (Directory.Exists(Npp.ConfXml.DirectoryNppUserDefineLangs)) {
108-
foreach(var file in Directory.GetFiles(Npp.ConfXml.DirectoryNppUserDefineLangs, "*.xml")) {
109-
try {
110-
FillDictionaries(new NanoXmlDocument(Utils.ReadAllText(file)).RootNode.SubNodes, file);
107+
if (Directory.Exists(Npp.ConfXml.DirectoryNppUserDefineLangs)) {
108+
foreach(var file in Directory.GetFiles(Npp.ConfXml.DirectoryNppUserDefineLangs, "*.xml")) {
109+
try {
110+
FillDictionaries(new NanoXmlDocument(Utils.ReadAllText(file)).RootNode.SubNodes, file);
111111
} catch (Exception e) {
112112
ErrorHandler.LogError(e, "Error parsing " + Npp.ConfXml.FileNppLangsXml);
113-
}
114-
}
113+
}
114+
}
115115
}
116116

117117
}

3PA/NppCore/Sci.cs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1731,7 +1731,11 @@ public static Lexer Lexer {
17311731
get { return (Lexer) Api.Send(SciMsg.SCI_GETLEXER); }
17321732
set {
17331733
var lexer = (int) value;
1734-
Api.Send(SciMsg.SCI_SETLEXER, new IntPtr(lexer));
1734+
if (Npp.SoftwareStringVersion.IsHigherOrEqualVersionThan("v8.4.0")) {
1735+
Api.Send(SciMsg.SCI_SETILEXER, IntPtr.Zero, new IntPtr(lexer));
1736+
} else {
1737+
Api.Send(SciMsg.SCI_SETLEXER, new IntPtr(lexer));
1738+
}
17351739
}
17361740
}
17371741

@@ -1752,15 +1756,6 @@ public static unsafe string LexerLanguage {
17521756
return GetString(new IntPtr(bp), length, Encoding.ASCII);
17531757
}
17541758
}
1755-
set {
1756-
if (String.IsNullOrEmpty(value)) {
1757-
Api.Send(SciMsg.SCI_SETLEXERLANGUAGE, IntPtr.Zero, IntPtr.Zero);
1758-
} else {
1759-
var bytes = GetBytes(value, Encoding.ASCII, true);
1760-
fixed (byte* bp = bytes)
1761-
Api.Send(SciMsg.SCI_SETLEXERLANGUAGE, IntPtr.Zero, new IntPtr(bp));
1762-
}
1763-
}
17641759
}
17651760

17661761
/// <summary>

3PA/NppCore/SciMsg.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,13 +903,13 @@ public enum SciMsg : uint {
903903
SCI_GETTARGETTEXT = 2687,
904904
SCI_STARTRECORD = 3001,
905905
SCI_STOPRECORD = 3002,
906+
907+
// Lexer
906908
SCI_SETLEXER = 4001,
907909
SCI_GETLEXER = 4002,
908910
SCI_COLOURISE = 4003,
909911
SCI_SETPROPERTY = 4004,
910912
SCI_SETKEYWORDS = 4005,
911-
SCI_SETLEXERLANGUAGE = 4006,
912-
SCI_LOADLEXERLIBRARY = 4007,
913913
SCI_GETPROPERTY = 4008,
914914
SCI_GETPROPERTYEXPANDED = 4009,
915915
SCI_GETPROPERTYINT = 4010,
@@ -929,6 +929,11 @@ public enum SciMsg : uint {
929929
SCI_SETIDENTIFIERS = 4024,
930930
SCI_DISTANCETOSECONDARYSTYLES = 4025,
931931
SCI_GETSUBSTYLEBASES = 4026,
932+
SCI_GETNAMEDSTYLES = 4029,
933+
SCI_NAMEOFSTYLE = 4030,
934+
SCI_TAGSOFSTYLE = 4031,
935+
SCI_DESCRIPTIONOFSTYLE = 4032,
936+
SCI_SETILEXER = 4033,
932937

933938
// Keys
934939
SCK_DOWN = 300,

3PA/Properties/AssemblyInfo.cs

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
#region header
2-
// ========================================================================
3-
// Copyright (c) 2018 - Julien Caillon (julien.caillon@gmail.com)
4-
// This file (AssemblyInfo.cs) is part of 3P.
5-
//
6-
// 3P is a free software: you can redistribute it and/or modify
7-
// it under the terms of the GNU General Public License as published by
8-
// the Free Software Foundation, either version 3 of the License, or
9-
// (at your option) any later version.
10-
//
11-
// 3P is distributed in the hope that it will be useful,
12-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14-
// GNU General Public License for more details.
15-
//
16-
// You should have received a copy of the GNU General Public License
17-
// along with 3P. If not, see <http://www.gnu.org/licenses/>.
18-
// ========================================================================
19-
#endregion
20-
using System.Reflection;
21-
using System.Runtime.InteropServices;
22-
23-
// General Information about an assembly is controlled through the following
24-
// set of attributes. Change these attribute values to modify the information
25-
// associated with an assembly.
26-
27-
[assembly: AssemblyTitle("3P - Progress Programmers Pal - Julien Caillon")]
28-
[assembly: AssemblyDescription("Progress Programmers Pal")]
29-
[assembly: AssemblyConfiguration("")]
30-
[assembly: AssemblyCompany("LeCavalierCasta")]
31-
[assembly: AssemblyProduct("3P")]
32-
[assembly: AssemblyCopyright("Copyright (c) 2018 - Julien Caillon - GNU General Public License v3")]
33-
[assembly: AssemblyTrademark("")]
34-
[assembly: AssemblyCulture("")]
35-
36-
// Setting ComVisible to false makes the types in this assembly not visible
37-
// to COM components. If you need to access a type in this assembly from
38-
// COM, set the ComVisible attribute to true on that type.
39-
40-
[assembly: ComVisible(false)]
41-
42-
// The following GUID is for the ID of the typelib if this project is exposed to COM
43-
44-
[assembly: Guid("31492674-6fe0-485c-91f0-2e17244588ff")]
45-
46-
// Version information for an assembly consists of the following four values:
47-
//
48-
// Major Version
49-
// Minor Version
50-
// Build Number
51-
// Revision
52-
//
53-
// You can specify all the values or you can default the Build and Revision Numbers
54-
// by using the '*' as shown below:
55-
// [assembly: AssemblyVersion("1.0.*")]
56-
57-
[assembly: AssemblyVersion("1.8.7.0")]
1+
#region header
2+
// ========================================================================
3+
// Copyright (c) 2018 - Julien Caillon (julien.caillon@gmail.com)
4+
// This file (AssemblyInfo.cs) is part of 3P.
5+
//
6+
// 3P is a free software: you can redistribute it and/or modify
7+
// it under the terms of the GNU General Public License as published by
8+
// the Free Software Foundation, either version 3 of the License, or
9+
// (at your option) any later version.
10+
//
11+
// 3P is distributed in the hope that it will be useful,
12+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
// GNU General Public License for more details.
15+
//
16+
// You should have received a copy of the GNU General Public License
17+
// along with 3P. If not, see <http://www.gnu.org/licenses/>.
18+
// ========================================================================
19+
#endregion
20+
using System.Reflection;
21+
using System.Runtime.InteropServices;
22+
23+
// General Information about an assembly is controlled through the following
24+
// set of attributes. Change these attribute values to modify the information
25+
// associated with an assembly.
26+
27+
[assembly: AssemblyTitle("3P - Progress Programmers Pal - Julien Caillon")]
28+
[assembly: AssemblyDescription("Progress Programmers Pal")]
29+
[assembly: AssemblyConfiguration("")]
30+
[assembly: AssemblyCompany("Noyacode")]
31+
[assembly: AssemblyProduct("3P")]
32+
[assembly: AssemblyCopyright("Copyright (c) 2018 - Julien Caillon - GNU General Public License v3")]
33+
[assembly: AssemblyTrademark("")]
34+
[assembly: AssemblyCulture("")]
35+
36+
// Setting ComVisible to false makes the types in this assembly not visible
37+
// to COM components. If you need to access a type in this assembly from
38+
// COM, set the ComVisible attribute to true on that type.
39+
40+
[assembly: ComVisible(false)]
41+
42+
// The following GUID is for the ID of the typelib if this project is exposed to COM
43+
44+
[assembly: Guid("31492674-6fe0-485c-91f0-2e17244588ff")]
45+
46+
// Version information for an assembly consists of the following four values:
47+
//
48+
// Major Version
49+
// Minor Version
50+
// Build Number
51+
// Revision
52+
//
53+
// You can specify all the values or you can default the Build and Revision Numbers
54+
// by using the '*' as shown below:
55+
// [assembly: AssemblyVersion("1.0.*")]
56+
57+
[assembly: AssemblyVersion("1.8.8.0")]
5858
//[assembly: AssemblyFileVersion("1.5.3.1")]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
[![GPLv3 licence](https://img.shields.io/badge/License-GPLv3-74A5C2.svg)](https://github.com/jcaillon/3P/blob/master/LICENSE)
1111
[![.net 4.6.1+ required](https://img.shields.io/badge/Requires%20.NET-4.6.1+-C8597A.svg)](http://go.microsoft.com/fwlink/p/?LinkId=671744)
12-
[![Notepad++ v7.5.4+ required](https://img.shields.io/badge/Requires%20Notepad++-v7.9.5-865FC5.svg)](https://notepad-plus-plus.org/downloads/v7.9.5/)
12+
[![Notepad++ v7.5.4+ required](https://img.shields.io/badge/Requires%20Notepad++-v8.4.2-865FC5.svg)](https://notepad-plus-plus.org/downloads/v8.4.2/)
1313
[![Gitter chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/_3P/discuss?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
1414

1515
[![logo](docs/images/notepad_and_3P.png)](https://jcaillon.github.io/3P/)

docs/NEXT_RELEASE_NOTES.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
### Improvements ###
2-
3-
-
4-
5-
### Fixed issues ###
6-
7-
-
1+
### Fixed issues ###
2+
3+
- Fix #294: 3P is not compatible with notepad++ v8.4+

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ <h2>An OpenEdge ABL (formerly 4GL Progress) code editor / IDE running on
331331
<div class="sidetitle img-info">Info</div>
332332

333333
<div class="content sidealternativebgnotepad">
334-
<a target="_blank" href="https://notepad-plus-plus.org/downloads/v7.9.5/"><span class="shield1">Requires Notepad++</span><span class="shield2">v7.9.5</span></a>
334+
<a target="_blank" href="https://notepad-plus-plus.org/downloads/v8.4.2/"><span class="shield1">Requires Notepad++</span><span class="shield2">v8.4.2</span></a>
335335
<br>
336336
<a target="_blank" href="http://go.microsoft.com/fwlink/p/?LinkId=671744"><span class="shield1">Requires .NET</span><span class="shield2">4.6.1+</span></a>
337337
<br>

0 commit comments

Comments
 (0)