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

Commit

Permalink
fix: #294 3P is not compatible with notepad++ v8.4+
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaillon committed Jun 28, 2022
1 parent b87fa51 commit e4e6465
Show file tree
Hide file tree
Showing 9 changed files with 1,049 additions and 1,002 deletions.
51 changes: 51 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# All text files should have the "lf" (Unix) line endings
* text eol=lf

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.sln text
*.yml text
*.yaml text
*.md text
*.csproj text
*.user text
*.cs text
*.manifest text
*.txt text
*.resx text
*.json text
*.p text
*.xml text
*.css text
*.html text
*.js text
*.nuspec text


# Text files that should be normalized to crlf
*.ps1 text eol=crlf
*.cmd text eol=crlf
*.bat text eol=crlf

# Binary files that should not be normalized or diffed

*.jar binary
*.exe binary
*.dll binary
*.pdb binary
*.pfx binary
*.snk binary

*.png binary
*.gif binary
*.jpg binary
*.bmp binary
*.ico binary

*.chm binary
*.7z binary
*.zip binary

*.pptx binary
*.xlsx binary

1,836 changes: 918 additions & 918 deletions 3PA/MainFeatures/Config.cs

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions 3PA/NppCore/NppLang.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ public NppLangs() {
}

// from directory userDefineLangs/
if (Directory.Exists(Npp.ConfXml.DirectoryNppUserDefineLangs)) {
foreach(var file in Directory.GetFiles(Npp.ConfXml.DirectoryNppUserDefineLangs, "*.xml")) {
try {
FillDictionaries(new NanoXmlDocument(Utils.ReadAllText(file)).RootNode.SubNodes, file);
if (Directory.Exists(Npp.ConfXml.DirectoryNppUserDefineLangs)) {
foreach(var file in Directory.GetFiles(Npp.ConfXml.DirectoryNppUserDefineLangs, "*.xml")) {
try {
FillDictionaries(new NanoXmlDocument(Utils.ReadAllText(file)).RootNode.SubNodes, file);
} catch (Exception e) {
ErrorHandler.LogError(e, "Error parsing " + Npp.ConfXml.FileNppLangsXml);
}
}
}
}
}

}
Expand Down
15 changes: 5 additions & 10 deletions 3PA/NppCore/Sci.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,11 @@ public static Lexer Lexer {
get { return (Lexer) Api.Send(SciMsg.SCI_GETLEXER); }
set {
var lexer = (int) value;
Api.Send(SciMsg.SCI_SETLEXER, new IntPtr(lexer));
if (Npp.SoftwareStringVersion.IsHigherOrEqualVersionThan("v8.4.0")) {
Api.Send(SciMsg.SCI_SETILEXER, IntPtr.Zero, new IntPtr(lexer));
} else {
Api.Send(SciMsg.SCI_SETLEXER, new IntPtr(lexer));
}
}
}

Expand All @@ -1752,15 +1756,6 @@ public static unsafe string LexerLanguage {
return GetString(new IntPtr(bp), length, Encoding.ASCII);
}
}
set {
if (String.IsNullOrEmpty(value)) {
Api.Send(SciMsg.SCI_SETLEXERLANGUAGE, IntPtr.Zero, IntPtr.Zero);
} else {
var bytes = GetBytes(value, Encoding.ASCII, true);
fixed (byte* bp = bytes)
Api.Send(SciMsg.SCI_SETLEXERLANGUAGE, IntPtr.Zero, new IntPtr(bp));
}
}
}

/// <summary>
Expand Down
9 changes: 7 additions & 2 deletions 3PA/NppCore/SciMsg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -903,13 +903,13 @@ public enum SciMsg : uint {
SCI_GETTARGETTEXT = 2687,
SCI_STARTRECORD = 3001,
SCI_STOPRECORD = 3002,

// Lexer
SCI_SETLEXER = 4001,
SCI_GETLEXER = 4002,
SCI_COLOURISE = 4003,
SCI_SETPROPERTY = 4004,
SCI_SETKEYWORDS = 4005,
SCI_SETLEXERLANGUAGE = 4006,
SCI_LOADLEXERLIBRARY = 4007,
SCI_GETPROPERTY = 4008,
SCI_GETPROPERTYEXPANDED = 4009,
SCI_GETPROPERTYINT = 4010,
Expand All @@ -929,6 +929,11 @@ public enum SciMsg : uint {
SCI_SETIDENTIFIERS = 4024,
SCI_DISTANCETOSECONDARYSTYLES = 4025,
SCI_GETSUBSTYLEBASES = 4026,
SCI_GETNAMEDSTYLES = 4029,
SCI_NAMEOFSTYLE = 4030,
SCI_TAGSOFSTYLE = 4031,
SCI_DESCRIPTIONOFSTYLE = 4032,
SCI_SETILEXER = 4033,

// Keys
SCK_DOWN = 300,
Expand Down
114 changes: 57 additions & 57 deletions 3PA/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
#region header
// ========================================================================
// Copyright (c) 2018 - Julien Caillon ([email protected])
// This file (AssemblyInfo.cs) is part of 3P.
//
// 3P is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// 3P is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with 3P. If not, see <http://www.gnu.org/licenses/>.
// ========================================================================
#endregion
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

[assembly: AssemblyTitle("3P - Progress Programmers Pal - Julien Caillon")]
[assembly: AssemblyDescription("Progress Programmers Pal")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("LeCavalierCasta")]
[assembly: AssemblyProduct("3P")]
[assembly: AssemblyCopyright("Copyright (c) 2018 - Julien Caillon - GNU General Public License v3")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM

[assembly: Guid("31492674-6fe0-485c-91f0-2e17244588ff")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.8.7.0")]
#region header
// ========================================================================
// Copyright (c) 2018 - Julien Caillon ([email protected])
// This file (AssemblyInfo.cs) is part of 3P.
//
// 3P is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// 3P is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with 3P. If not, see <http://www.gnu.org/licenses/>.
// ========================================================================
#endregion
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.

[assembly: AssemblyTitle("3P - Progress Programmers Pal - Julien Caillon")]
[assembly: AssemblyDescription("Progress Programmers Pal")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Noyacode")]
[assembly: AssemblyProduct("3P")]
[assembly: AssemblyCopyright("Copyright (c) 2018 - Julien Caillon - GNU General Public License v3")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.

[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM

[assembly: Guid("31492674-6fe0-485c-91f0-2e17244588ff")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("1.8.8.0")]
//[assembly: AssemblyFileVersion("1.5.3.1")]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[![GPLv3 licence](https://img.shields.io/badge/License-GPLv3-74A5C2.svg)](https://github.com/jcaillon/3P/blob/master/LICENSE)
[![.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)
[![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/)
[![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/)
[![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)

[![logo](docs/images/notepad_and_3P.png)](https://jcaillon.github.io/3P/)
Expand Down
10 changes: 3 additions & 7 deletions docs/NEXT_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
### Improvements ###

-

### Fixed issues ###

-
### Fixed issues ###

- Fix #294: 3P is not compatible with notepad++ v8.4+
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ <h2>An OpenEdge ABL (formerly 4GL Progress) code editor / IDE running on
<div class="sidetitle img-info">Info</div>

<div class="content sidealternativebgnotepad">
<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>
<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>
<br>
<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>
<br>
Expand Down

0 comments on commit e4e6465

Please sign in to comment.