Commit Graph

4751 Commits

Author SHA1 Message Date
Don Ho 2113e782fb Use string lexer ID instead of numeric ID for Scintilla 5
Plus some factoring.

Close #11472
2022-04-04 18:01:51 +02:00
Don Ho 121a396bf0 Make external language library work again after upgrading to Scintilla5
Make external lexer library work again after upgrading to Scintilla5.
Old external lexer libraries needs to add CreateLexer export function which returns ILexer5 instance (Lexilla protocol interface of Scintilla5).

Tested with papyrus lexer plugin, this external lexer plugin is compatible with Notepad++ next release:
https://github.com/blu3mania/npp-papyrus

Close #11468
2022-04-03 18:23:03 +02:00
Don Ho 252468c29b Revert "Remove the external lexer support"
This reverts commit 41a5bf0245.
2022-04-01 19:17:18 +02:00
Don Ho 2871ee519b Revert "Fix syntax highlighting regression with cmdline argument"
This reverts commit 7a2f809e68.
2022-04-01 19:16:41 +02:00
Don Ho 7a2f809e68 Fix syntax highlighting regression with cmdline argument
41a5bf0245 (commitcomment-69921228)
2022-03-31 03:04:10 +02:00
Don Ho 41a5bf0245 Remove the external lexer support
SCI_LOADLEXERLIBRARY has been removed since Scintilla 5,
and I belive that Scintilla won't support it anymore:
https://sourceforge.net/p/scintilla/bugs/2236/

Close #11451
2022-03-30 18:52:47 +02:00
Christian Grasser a61b03ea88 Update Scintilla from v4.4.6 to v5.2.1 and add Lexilla v5.1.5
Update with https://www.scintilla.org/scintilla521.zip
            https://www.scintilla.org/lexilla515.zip

- fix setting to bring Scintilla::PositionCR from ScintillaStructures.h inline with Sci_Position.h Sci_PositionCR
- add workaround to enable lexer for searchResult
commented out SCI_SETILEXER call on searchResult to get one result which is correctly handled by the lexer,
added comment about the current problem with property @MarkingsStruct which seems to disappear after call to SCI_SETILEXER or CreateLexer
- corrected usage of ObjC lexer
- removed unnecessary filter stuff
- use own sections for scintilla and lexilla build targets and allow parallel builds
- as libscilex is no longer existing, changed to libscintilla
- adapt makefiles and cmake
- use VS2019
- started simple changes for createlexer adaptations, nullpointercheck missing on return of lexer name from deprecated LexerNameFromID -> undefined behaviour
- movement from id -> lexer name, mostly done via LexerNameFromID + switching off corresponding compiler warning
- changed to SCI_SETILEXER from SCI_SETLEXER, SCI_SETLEXERLANGUAGE needs to be corrected, see Scintilla5Migration.html
- just commented out: SCI_LOADLEXERLIBRARY

Fix #10504, close #11419
2022-03-27 17:12:53 +02:00
Ashfaaq18 32580e6a80 Fix Document list not sync with tab order after sorting
Document List now updates itself with respect to the tabs sorted by the windows dialog

Fix #11272, close #11411
2022-03-22 19:23:02 +01:00
Ashfaaq18 6086e819fd Fix dark mode disabled static text color in Column Editor and Style configurator
Fix #11407, close #11409
2022-03-22 18:38:50 +01:00
Don Ho d9c5688635 Fix file saving critical bug under Symantec encryption desktop
Fix #11339, close #11403
2022-03-18 14:32:25 +01:00
VinsWorldcom 10ec944800 Fix wrong xml structure in 2 Auto-completion files
Move `<Environment>` tag into `<AutoComplete>` tag as per file definition for Cobol and Lua.

Fix #11393, close #11394
2022-03-17 16:57:04 +01:00
Daniel Fuchs dddffcf0fd Layout improvement in FindReplaceDlg
* move labels to resemble v8.2 positioning
* resize IDD_FINDINFILES_DIR_COMBO to make it end with the other comboboxes
* resize IDD_FINDINFILES_BROWSE_BUTTON to match combobox height
* make IDD_FINDREPLACE_SWAP_BUTTON in line with IDD_FINDINFILES_BROWSE_BUTTON
* expand GroupBox to allow for a wider IDREDOTMATCHNL
* expand IDREDOTMATCHNL
* improve scaling algorithm for those ComboBoxes

Fix #11318, close #11386
2022-03-17 15:26:40 +01:00
Don Ho 9465925cd1 easterEggs++; 2022-03-17 13:35:09 +01:00
Don HO a29cfa8d25 Notepad++ release v8.3.3 2022-03-15 00:17:40 +01:00
Don Ho 6892bcbf3a Fix Inslaller bad checkbox display under high DPI (250%)
Close #11384
2022-03-14 12:50:57 +01:00
Ashfaaq18 4e97469d8f Fix a small regression due to c3daf4448d
Close #11378
2022-03-13 02:23:09 +01:00
VinsWorldcom d6b736aac0 Add warnings keyword for Perl
Fix #11369, close #11370
2022-03-12 02:38:46 +01:00
Christophe Mateos dc10d821e6 Update french.xml
From #11322
All new fork/branch

Close #11372
2022-03-11 19:05:44 +01:00
Mr-Update e04daf8b94 Update german.xml
- Update translation to 8.3.2
- Translation improved
- Hotkeys corrected

Close #11293
2022-03-10 20:55:17 +01:00
VinsWorldcom 9a1a999bef Add new AutoComplete icon for distinguishing functions from normal keywords
Fix #11311, close #11314
2022-03-10 20:39:09 +01:00
Thomas De Rocker 3286b3120e Update dutch.xml
Close #11321
2022-03-10 20:00:07 +01:00
Regmos c802f86d38 Update danish.xml
Close #11306
2022-03-10 19:58:46 +01:00
Don Ho a84cbe8f69 Add new ability for filtering incompatible plugins
In commit f9118dd13c **"npp-compatible-versions"** has been added in plugin list for helping not only Plugin Admin, but also Plugin Manager (Plugin Loader) to check the compatibility with the latest version of plugin (if the version of installed plugin is the latest one).
However, if the version of installed plugin is the previous one, there's no info to know if this plugin with old version is compatible with running Notepad++. In order to filter better old version plugins, **"old-versions-compatibility"** is added in plugin list, so Plugin Manager can use it to check the compatibility to decide load it or not.

The value of "old-versions-compatibility" is a string made by 2 interval versions as following:
`"old-versions-compatibility": "[,2.6][,8.2.1]"`

The first interval versions are for old plugin versions: [,2.6] means from all the versions to v2.6 included.
The second interval versions are for Notepad++ versions: [,8.2.1] means from all the versions to v8.2.1 included.
Both interval versions together means: the plugin in question from the 1st version to v2.6 is compatible with Notepad++ v8.2.1 and all Notepad++ previous versions.

Here is the sample:
```json
{
	"folder-name": "mimeTools",
	"display-name": "Mime tools",
	"version": "2.7",
	"npp-compatible-versions": "[8.3,]",
	"old-versions-compatibility": "[,2.6][,8.2.1]",
	"id": "b65fbfaa15b443131eb69188069cacbff04eca66e0cb84130631303a1d3895f8",
	"repository": "https://github.com/npp-plugins/mimetools/releases/download/v2.7/mimetools.v2.7.zip",
	"description": "Implements several main functionalities defined in MIME.",
	"author": "Don HO",
	"homepage": "https://github.com/npp-plugins/mimetools"
},
```
Considering these 2 scenarios:
1. The current distributed plugin version is v2.7 (the latest one normally), and it is compatible with all Notepad++ version from v8.3. If installed MineTools plugin is v2.7 and running Notepad++ is v8.3.3 then it's OK, and MineTools v2.7 will be loaded.

2. If installed MineTools plugin is v2.6 and running Notepad++ is v8.3.3 then Plugin Manager learns it's a previous version (v2.6 < v2.7), so it will check "old-versions-compatibility" - it will find v2.6 is in the 1st interval [,2.6] - it's matched, then Plugin Manager keep checking the running Notepad++'s compatibility: v8.3.3 is not in the 2nd interval [,8.2.1] - it's not compatible, then MineTools plugin v2.6 won't be loaded.

Here are the test instructions for this PR:
1.  download x64 debug binary here:
https://ci.appveyor.com/api/buildjobs/5ba501ecu21k28i7/artifacts/Notepad%2B%2B.x64.Debug.exe
2. Create an empty file "nppPluginList.json" in your `npp\plugins\Config\`
and copy the following content
5e23fce868/src/pl.x64.json
and paste into `npp\plugins\Config\nppPluginList.json`
You have to copy "updater" folder (which contains GUP.exe) to enable plugin list.
3. Download DSpellCheck plugin v1.4.22 which is not compatible with Notepad++ from v8.3 and later version here:
https://github.com/Predelnik/DSpellCheck/releases/download/v1.4.22/DSpellCheck_x64.zip
Install it into plugin folder manually.
4. Now launch Notepad++ x64 debug binary and watch it crash.
5. Edit "nppPluginList.json" by adding `"old-versions-compatibility": "[,1.4.22][,8.2.1]",` into DSpellCheck section.
6. Startup Notepad++. Notepad++ doesn't crash. and now you can check DSpellCheck plugin is not loaded on the startup.

Fix  #11358, fix #11349, close  #11356
2022-03-09 19:26:01 +01:00
mere-human 53cbe1c227 Fix append extension when saving with Return (win 7)
For some reason, the file name ComboBox isn't present when enumerating windows in OnFolderChange().
Because of that, we can't call onPreFileOk() in keyboard hook procedure.
Fix that by retrying window search in OnSelectionChange() if we didn't find them previously.

Fix #11305, fix #11355
2022-03-09 03:57:00 +01:00
xomx 4593293b4d Fix Plugin Admin close issue after typing ENTER
Prevent closing the PA-dlg by ENTER in search editctrl.

Ref:
https://support.microsoft.com/en-us/topic/how-to-use-the-enter-key-from-edit-controls-in-a-dialog-box-a520c533-1a62-f51c-af93-c7f978bc1080

Fixes: #11348, close #11351
2022-03-09 03:44:03 +01:00
Ashfaaq18 f6ea35d521 Fix RTL alignment bug in preferences dialog when dark mode enabled
Fixed "Dark Mode->Customize tone" color pickers RTL alignment

Fix #11343, close #11354
2022-03-09 02:25:54 +01:00
Ashfaaq18 c3daf4448d Fixed blurry disabled static texts of Preferences in Dark mode
Set static text colour in both light/dark mode directly for disable/enable action instead of EnableWindow().

Fix #10823, fix #11331, close #11342
2022-03-09 02:14:53 +01:00
Don Ho f9118dd13c Use plugin list's plugin compatibility info for loading plugins
A new ability for checking plugins' compatibility with running Notepad++ has been added in Plugin List & Plugin Admin (a06b404708).
This PR extends this ability by using Plugin Admin's plugin list to filter plugins to load - if any plugin to load with **the same folder name**, **the same version** (as in the plugin list) and it's **not compatible** with the running Notepad++ version found while loading plugins, it will be skipped for being loaded.

Fix #11353, close #11350
2022-03-07 15:33:36 +01:00
Mr-Update f285c5983a Update stylers.model.xml
Close #11296
2022-03-05 02:03:08 +01:00
LEONARDO SILVA 9cbd03c301 Add more API for custom auto-indentation and current macro status
4 new API are added:
- NPPM_GETEXTERNALLEXERAUTOINDENTMODE
- NPPM_SETEXTERNALLEXERAUTOINDENTMODE
- NPPM_ISAUTOINDENTON
- NPPM_GETCURRENTMACROSTATUS

* Added support for custom auto-indentation for external lexer.
* Also added messages to fetch current Macro status (Idle, Recording, Stopped, Running) -> for this also affects auto-indentation behavior.
* Also added capability to query for the current User Settings of "Use Auto Indentation".

Fix #11253, close #11278
2022-03-05 00:57:43 +01:00
Don Ho a06b404708 Add Notepad++ compatible versions in plugin list
Implement: https://github.com/notepad-plus-plus/nppPluginList/issues/416

While PluginAdmin loading nppPluginList.dll, it will check an attribute "npp-compatible-versions" (optional),
in order to determinate if plugin is compatible to the current version of Notepad++. If plugin is not compatible,
then this plugin will be ignored, therefore it won't be shown on the PluginAdmin's plugin list.
Note that it's only about pluginsAdmin's plugin list:
it prevent from Notepad++ install/update a plugin non-compatible to current version of Notepad++,
but it still allows Notepad++ load this plugin in question, if it's already installed.

Here is the attribite "npp-compatible-versions" looks like in plugin list json file:
```
{
	"name": "npp-pluginList",
	"version": "1.4.7",
	"arch": "32",
	"npp-plugins": [
		{
			"folder-name": "demoPluginA",
			"display-name": "Demo Plugin A",
			"version": "1.8.7",
			"npp-compatible-versions": "[4.2,6.6.6]",
			"id": "9c566a9083ef66a0ce93a3ce5f55977faea559b5b0993e37a1461b87f4aeb6f0",
			...
		},
		{
			"folder-name": "demoPluginB",
			"display-name": "Demo Plugin B",
			"version": "1.1.8.7",
			"id": "8a6b9dadbf2ec37d5c60a12a5445f0eec2ef00e6eaa80452925789fd73950193",
			...
		},
		...
	}
}
```
It's optional. In the case of its absence, it's considered compatible to all versions of Notepad++.
The format of value for "npp-compatible-versions" is following (no white space is allowed):

"6.9"          : exact version 6.9
"[4.2,6.6.6]"  : from version 4.2 to 6.6.6 inclusive
"[8.3,]"       : any version from 8.3 to the latest one
"[,8.2.1]"     : 8.2.1 and any previous version

Fix #11338, close #11334
2022-03-04 17:36:57 +01:00
Daniel Fuchs 0affe35bc6 Re-enable possibility to center the FindReplaceDlg on Notepad++ main window
* add goToCenter to hotkey check in IDM_SEARCH_(FIND|REPLACE|FINDINFILES|MARK)

Before commit aa69711d it was possible to center the dialog on Notepad++ using a second CTRL+F but was lost during the implementation of #10019, #10177.

This will re-add the function:
* When the hotkey used is not associated with the current tab, it will switch to the new tab (as before).
* If the hotkey used is associated with the current tab, it will center the FindReplaceDlg on Notepad++.

Fix #9201, close #11323
2022-03-04 17:19:50 +01:00
xomx a419b41ed5 Fix crash regression due to ca8c302805
Crash regression has been inserted by #11258.

The 2GB+ adaptation has forced change in integers saving via TinyXML (now saved indirectly as strings). While the MapPosition part has been already fortified against possible missing session-file items, the Position part not. So implemented likewise the MapPosition way.

Fix #11325, close #11327
2022-03-04 13:37:06 +01:00
xomx c19033c917 Make the silent uninstall of N++ via 'winget' possible
Fix issue https://github.com/microsoft/winget-pkgs/issues/49601

Fix #11310, close #11316
2022-03-02 22:27:09 +01:00
Don Ho 4b9aa66aee Add extension "aspx" for ASP 2022-03-02 02:35:58 +01:00
Daniel Fuchs c869357c0f Include C# 9.0 nint/nuint
Fix #11303, close #11307
2022-03-02 01:35:44 +01:00
xomx ebabed554b Fix deleting the folded line makes folded (hidden) content disapeared
Applying the Scintilla flag SC_AUTOMATICFOLD_CHANGE, ref:
https://www.scintilla.org/ScintillaDoc.html#Folding

"SC_AUTOMATICFOLD_CHANGE (0x4) Show lines as needed when fold structure is changed. The SCN_MODIFIED notification is still sent unless it is disabled by the container."

Fix #11246, close #11280
2022-03-02 00:46:23 +01:00
Don Ho c435625d32 Add a new Easter Egg 2022-03-01 15:01:47 +01:00
Don HO 30b6b18d1e Notepad++ 8.3.2 release - Declare variables, not war 2022-02-27 16:15:06 +01:00
Hugo Carvalho ca5a272ea8 Update portuguese.xml
Close #11301
2022-02-26 22:39:15 +01:00
Christophe Mateos 72602b62eb Update french.xml
Moved lines to better match english.xml file, to ease human-eye future maintenance (mainly to quickly catch missing/extra entries)
Also a few new lines and comments with the same goal in mind

Close #11283
2022-02-26 16:18:42 +01:00
Edditoria 1b0400698f Update localization: Hong Kong Cantonese
As at commit 8132f4f of this repo.
Also bump version to v8.3.2 in advance.

Close #11286
2022-02-26 16:14:52 +01:00
jasasa bb8eea13d1 Update norwegian.xml
More up to date Norwegian translation.

Close #11294
2022-02-26 16:13:14 +01:00
xomx 3482ed97ea Fix UDL comment config input fields broken regression
Which caused by commit 94154b0f0e.

Fix #11239, close #11292
2022-02-26 15:58:22 +01:00
Don Ho 8132f4f3b0 Update Taiwanese Mandarin translation 2022-02-24 02:14:37 +01:00
Christophe Mateos 0872c69ea4 Update french.xml
With most of @fylip22 changes and I believe all @donho comments taken into account from https://github.com/notepad-plus-plus/notepad-plus-plus/pull/11124

Close #11273
2022-02-24 02:00:51 +01:00
rddim 2c9ef04198 Update Bulgarian localization
Close  #11279
2022-02-24 01:53:35 +01:00
kubalav 9e5ab51901 Update Slovak translation to 8.3.2
Close #11276
2022-02-24 01:51:00 +01:00
Don Ho bfbad49cf4 Fix incoherence about supporting 2GB+ files 2022-02-24 01:48:28 +01:00
xomx 11128e5c3e Update and fix czech.xml
Close #11270
2022-02-23 15:11:02 +01:00