LexerStylerArray contains a MAX_LEXER_STYLE-element array (currently 100) of LexerStyler objects. Every one of them in turn via inheritance from StyleArray contains a SCE_STYLE_ARRAY_SIZE-element array (I tested with 99) of Style objects each at least 56 bytes in size. This in my test case requires over 550k of memory, and if LexerStylerArray is allocated on stack, the stack becomes corrupted. (Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10454#issuecomment-908732786)
Inline arrays are a part of an object and increase its size while std::vector uses memory from the heap and stores internally only a pointer to a chunk of memory, thus the size of an object with a vector is substantially smaller than the one with an inline array. (Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/10454#issuecomment-908780106)
Fix#10454, fix#10206
Follow these commits:
* Substitute "Mark" for "Style" in the menu entries (2576bf884b)
* Update English localization file to v8.1.4 (45831ac050)
Close#10416
When both Windows and Notepad++ use RTL language, the Save/Open button is swapped with Cancel button.
Now take that into account when searching the button.
Fix#10397, close#10400
This PR uses always current buffer's path in Find in Files dialog:
When "Follow current doc." is checked, then use current path first.
If that fails, fallback to the working directory as it was before.
Fix#8045, close#10387
The plugins' toolbar icons can be displayed in both light/dark mode by using their original icons.
Though using new API NPPM_ADDTOOLBARICON_FORDARKMODE to have better look & feel is recommanded.
Fix#9959, fix#10388, fix#9809
There's a security flaw for the un-installation of Notepad++ in Windows Register, the string without quotes:
C:\Program Files\Notepad++\uninstall.exe, whereas it should be "C:\Program Files\Notepad++\uninstall.exe".
The reason is, hacker can create a file called c:\program.exe, then Windows could interpret Files\Notepad++\uninstall.exe as the argument, so the system could run c:\program.exe. Ref:
https://isc.sans.edu/diary/Help+eliminate+unquoted+path+vulnerabilities/14464
Fixed by @ozone10:
Fix#10191, fix#6165, close#10369
Add Markdown UDL of dark mode and the ability to apply it:
After dark mode being swiched in, all files with extension .md will be opened by applying Markdown UDL of dark mode.
When light mode is switched back, the default Markdown UDL (of light mode) will be applied to the new opened .md file.
Please note that all .md files opened before switching to new mode, will remain in the previous mode. User has to close and reopen these files to have the right Markdown UDL applied.
Fix#10196, close#10347
Fix 2 RTL issues:
1. wrong path in tooltip of tab (#8520).
2. the file drag and drop bug (#8730) - now user can drag and drop to the exact view.
Fix#8520, fix#8730, close#10348
Currently, when the shortcut mapper is filtering shortcuts, it doesn't display key conflicts properly. This is due to the indexes of the filtered shortcuts being different (since there are less) than the original list of shortcuts.
Author @jmbockhorst
(the original branch has been deleted)
Fix#5374, close#5453
Pass a pointer to FileDialogEventHandler instance via GWLP_USERDATA
instead of using static variable. This way each window can have its
own pointer.
Fix#10290, close#10303
Rename "Unicode Debug" => "Debug", "Unicode Release" => "Release"
since there is no non-Unicode version.
Also, fix the name in other configs for Git, AppVeyor and in the docs.
Fix#10114, close#10278
1. Add panels' toolbar icons in both dark/light mode for Folder as Workspace panel and function list panel.
2. Add panels' dark/light mode (Fluent UI style) icons for the tab interface.
3. Update doclist icons.
4. Remove not used icon.
Note that these icons cannot be changed dynamically yet while switching between light mode & dark mode.
Fix#10066
1. Make dark colors consistent for panel toolbars.
2. Make dark colors consistent style configurator edit controls.
3. Make dark colors consistent for docking elements.
* BackgroundColor(), BackgroundBrush() – should be used for items which have some interactions, or need to be different from Darker variant.
* DarkerBackgroundColor(), DarkerBackgroundBrush() – should be used for static/top backgrounds.
* SofterBackgroundColor(), SofterBackgroundBrush() – should be used for items , which have interactions, or have focus.
Fix#10242, close#10243
1. Apply dark mode on value dialogs (dialogs created in preference).
2. Change value dialogs border style.
3. Apply dark mode on close button for other views (fullscreen, post-itand distraction free).
Fix#10253, fix#10210, close#10254
Avoid the same window procedure being used for several different edit boxes.
The problem was found on Windows Vista but it can happen in other environment too.
Fix#10238, close#10241
1. Apply dark mode on find in finder dialog.
2. Apply dark mode on progress window (searching in files).
3. Make color more consistent for incremental search.
4. Use different border style for incremental search.
5. Set border for finder for docking panel consistency.
Fix#10233, close#10234