Update with https://www.scintilla.org/scintilla521.ziphttps://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
* 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
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
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
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
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
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
* 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
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
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
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
Add translations for these commits:
* Add "Sort By" commands under Window Menu (1c8b867395)
* Add "Windows..." localization entry (ee765135be)
Also this contains a fix for minor translation error.
Close#11266
Some members (_line2go, _column2go and _pos2go) from the CmdLineParams & CmdLineParamsDTO structs need 'int' to 'intptr_t' change to support 2GB+ files.
Saving & loading of the 'session.xml' needs a 2GB+ adaptation too. The underlying TinyXML (older v1) does not have a native support for the 64-bit integers, so loading/writing there has been changed to strings instead of integers. This way is fully compatible with a possible future update to TinyXML-2 (which has already built-in support for the 64-bit integers).
Fix#11213, close#11258
Refine autosaving session on exit behaviour on only "Open session in a new instance" or "always in multi-Instance".
If the "Default (mono-instance)" is chosen and the session is launched via command line with flag "-multiInst", the modified session won't be saved automatically.
Fixes#11249, close#11255
Notepad++ is unnecessarily stalled in the situation, when closing a N++ with a large file opened within, but the session.xml file will not be updated at all due to the current Notepad++ settings chosen.
Fix#11219, close#11259
The "Window" menu localization was pleinty of dirty hack due to "Plugin" menu was created (or not) dynamically.
Now "Plugin" menu is present statically so we localize this entry as other entries.
Add index check when add User Defined Language
If user create User Defined Language over 30 (NB_MAX_USER_LANG) times app is crash.
Fix#11257, close#11251
Removing the 'case sensitive' default flag FILE_FLAG_POSIX_SEMANTICS fixes the CreateFile ERROR_PATH_NOT_FOUND, when working with files like "C:\Windows\Sysnative\drivers\etc\hosts".
Without the FILE_FLAG_POSIX_SEMANTICS the WIN32 IO (CreateFile/WriteFile) way will be equivalent with the previously used POSIX IO (fopen/fwrite) way.
More info about this "Sysnative" alias: https://docs.microsoft.com/en-us/windows/win32/winprog64/file-system-redirectorFix#11196, close#11225
Add "removing old version (3.1.1.10) of XMLTool" entry in installer to prevent Notepad++ x64 from crash.
Its v3.1.1.12 or upper versions are allowed.
Fix#11236
- WantToOpenHugeFile
- added missing translations for Print Header & Footer Variable combobox items
- better meaning for some of the edit-onSelection items
- some previous typing error corrections
Close#11100
Fix for the /D= NSIS param regression (x64)
Detailed explanation is in the .onInit patch comments.
This regression has been caused by the previous PR: #11013 .
Fix#11072, close#11158
English localization for #11047
* add translation for WantToOpenHugeFile as referenced by commit 46011e3
* add previously untranslated drop-down items in Preferences > Print
Close#11093
In FileManager::loadFileData method:
1. Fix unnecessary GCC crashes when opening larger files in 32-bit Notepad++ binary.
2. Take into account and report correctly also other possible Scintilla error states there (than the previously handled SC_STATUS_BADALLOC).
3. Catch and report correctly also exceptions not handled by the Scintilla exception handler.
4. Catch and report correctly also Notepad++ code exceptions there.
Fix#11103, close#11112
Use hooks for keyboard and window procedure instead of subclassing controls.
Use a handle map for transferring instance data to the hook procedure.
This approach should be more reliable than the previous one.
Fix#10436, close#11050
Since auto-completion feature appeared in Notepad++, its selected item insertion default setting has had been always both "ENTER" & "TAB" keys. In commit 68d339d224eba0fa7aeb2e0f7526b3311cc02c5a:
68d339d224
this default setting was changed to only "TAB", that made a lot users who used "ENTER" for insertion unhappy.
In this commit the old default value has been restored. Users can always change this behaviour in auto-completion settings of preferences dialog.
Ref:
https://community.notepad-plus-plus.org/topic/22425/notepad-v8-2-1-release/34?_=1644179730538
When file is opened via "Edit with Notepad++", cursor position is placed on the 2nd position instead of the first.
This fixes the signed/unsigned mismatch there arisen from the current 2GB+ changes.
Fix#11131, close#11132
While loading files over more 200MB, they are all considered as Normal text files, that improve loading speed (for example for huge XML or SQL file).
Also, the feature as braces match, smart highlightingg, tag match and URL colorization are disabled for not penalizing the editing performance.
Make the following context menu items translatable:
1. "Style all occurrences of token"
2. "Style one token"
3. "Clear style"
4. "Plugin commands"
Note for translators: to test your translation, you have to replace the old "contextMenu.xml" with the new one (modified in this commit).
Fix partially #8972Fix#9713, close#11031
in some circumstance people have to ENTER twice to have 1 newline feed.
In this commit, 2 options (ENTER & TAB) are given in Auto-completion settings, so users can choose one of these 2 keystrokes (or both, or none). By default ENTER is disabled and TAB is enabled.
If auto-completion is disabled and completion is triggered manually, then the settings of ENTER & TAB won't be considered, both ENTER & TAB will be able to insert the selection.
Fix#4799, fix#4631, fix#8389, fix#10915, close#11016
In the following configuration loaded session will be empty on exit
* Remember current session for next launch: OFF
* Open session in a new instance: ON
This commit fix the issue.
Fix#10986, close#11017