- update Find, Replace, Zoom In and Zoom Out icons
- much better consistency between these 4 icons
- significantly improved/sharper in all scaling scenarios
- particularly more distinguishable at smaller sizes
- entirely custom made (following Fluent design guidelines)
Close#15361
Add/Update translation texts for these commits:
* Update English translation for v8.6.8 (indentation setting) (9f6e9c0)
* Add message box with information about disabled backward regex searching (07e9503)
Close#15254
The exception/crash occurs due to the unsupported icon format in Windows Server Core 2022 (due to the lack of a graphical library).
The commit tries to make loading icons fail-safe, and it represents a balance between the functionality of loading icons and the minimal graphic support required for Notepad++:
In the event of loading problems in a typical Windows version with complete graphical library support (which is unlikely but possible), users will receive alerts, and the ICO ID in question will be displayed in the caption.
However, under Windows Server Core 2022, multiple alert message boxes may appear during Notepad++ launch, but they can be stopped after the first one, allowing the user to use Notepad++ normally.
3 choices on the alert message: "Yes" for ignoring error(s) and launch Notepad++, "No" for stop lauching Notepad++ and quit it. "Cancel" for displaying all message error with the loading failure of ICO ID in caption, and launch Notepad++.
Fix#15313, close#15315
Add command line parameter "/runNppAfterSilentInstall" for Notepad++ installer.
This parameter launches installed Notepad++ after silent installation.
Of course, the parameter takes effect only when "/S" (silent installation) is used.
Fix partially #8514, follow up #15230Close#15280
Restore old paste into rectangular selection behavior: only call pasteIntoMultiSelection for multiple stream selections and not for rectangular selections.
Fix#15139, fix#15151, close#15261
New Notepad++ NSIS installer cmdline option.
If specified on the cmdline, it first tries to use the usual app-closing by sending the WM_CLOSE message to the running Notepad++.
If that standard closing fails, it uses consequently the forceful TerminateProcess WINAPI way.
Partially fix the #8514, followup of the #14251.
Close#15230
Implement some size limits for the Notepad++ docked and floating panels, as the users often "lost" its panels (e.g. when they minimized them to zero width or height).
This also fixes the config.xml possible previous "out-of-the-allowed-range" data.
Fix#13084, close#15236
- zero init LexSearchResult.cxx lineBuffer
- WindowsDlg::resetSelection() add nullpointer check as assert just triggers on debug builds
- added missing nullpointer checks in Utf8_16.cpp on allocated memory
- added missing nullpointer check on notifyView for case SCN_AUTOCSELECTION in NppNotification.cpp
- added missing nullpointer check on clipboardData in NppCommands.cpp
Close#15195
- update CI link from appveyor to GH action
- add option to makefile build mingw build also with Clang++ instead of g++
- add option to makefile to enable clang analyzer
Close#15189
Tweak dark mode custom draw for plugin:
- add plugin custom draw support for toolbar
- make code more consistent
- make plugin's authors custom draw implementation
to have higher priority than one from generic dark mode
ref #15078 (comment)
Close#15147
- added autoCompletion for Go and Raku to installer script.
- added function list for Raku as starting point, currently just an adapted copy of the perl functionlist.
Related to #15000 and #14966Close#15128
Check if URL is enclosed in apostrophes or backtick (grave accent). Only if URL is directly preceded by apostrophe/backtick and URL ends with apostrophe/backtick respectively.
Fix#14978, fix#14323, fix#14212, close#15058
Changes:
Ada is case insensitive
Added 'Parallel' reserved word
Identifiers may not begin or end with underscore
Support for identifiers containing digits
Support for Ada specifications file (subprogram declaration) (#14687)
Support for dot notation within types (#14908)
Support for generic instantiations (#14498) (functions with no return statement)
Fix#14908, fix#14687, fix#14498, close#14986
Using the composition instead of the multiple inherence
1. For preventing from the diamond problem.
2. To fix the semantic problem by using DPIManagerV2 as class ancestor of class StaticDialog.
Remove also unecessary scaleX, unscaleX, scaleY & unscaleY methods.
Sintilla Release 5.5.0 (https://www.scintilla.org/scintilla550.zip)
Released 23 April 2024.
Add elements for inactive additional selections SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT and SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK. When not set these default to SC_ELEMENT_SELECTION_INACTIVE_TEXT and SC_ELEMENT_SELECTION_INACTIVE_BACK. Bug #2417.
On Cocoa, avoid use of NSUserDefaults which will soon require justification when used in applications on the App Store.
Fix Win32 IME crash in windowed mode. Bug #2433.
Scale reverse arrow cursor for margins to match other cursors when user changes pointer size. Bug #2321.
Lexilla Release 5.3.2 (https://www.scintilla.org/lexilla532.zip)
Released 23 April 2024.
COBOL: Stop string literal continuing over line end. Issue #229.
COBOL: Stop doc comment assigning different styles to \r and \n at line end. Issue #229.
COBOL: Recognize keywords that start with 'V'. Issue #230.
COBOL: Recognize comments after tag or that start with '/'. Issue #231.
HTML: Implement substyles for tags, attributes, and identifiers SCE_H_TAG, SCE_H_ATTRIBUTE, SCE_HJ_WORD, SCE_HJA_WORD, SCE_HB_WORD, SCE_HP_WORD, SCE_HPHP_WORD.
HTML: Implement context-sensitive attributes. "tag.attribute" matches "attribute" only inside "tag".
HTML: Match standard handling of comments. Issue #232.
Lua: Implement substyles for identifiers SCE_LUA_IDENTIFIER.
Ruby: Allow non-ASCII here-doc delimiters. Issue #234.
Ruby: Allow modifier if, unless, while and until after heredoc delimiter. Issue #236.
Rust: Recognize raw identifiers. Issue #239, Pull request #240.
Close#15042
- reorder controls for consistent tab switch
- make spacing and position more consistent
- use system aware or gdi scaling for Color dialog and Color popup
ref #14959Close#15029
- StringDlg (Rename Current Tab, ...)
- UDL Styler
- UDL in undock state
- UDL allow tab switching between main dialog and subdialogs
- make controls spacing and size consistent
ref #14959Close#15024
- Run
- Run a Macro Multiple Times...
- Shortcut
- code enhancement
- add override in shortcut.h
- modify switches in WM_COMMAND
- optimize dark mode for shortcut
- avoid potential multiple subclassing for Run dialog
ref #14959Close#15017
Currently while flush file buffers action fails at not critical end session, a error message dialog display the problem.
It raises the problem of some external process interfering with the Notepad++ file saving (via NppSaveAsAdmin plugin).
This commit logs this error at critical end session, so if NUL characters content issue happens to the users again, we can try to know what was happening, plus users' plugin list.
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14990#issuecomment-2054242025Close#15003
- fix linux build on include upper/lowercase issue ../src/dpiManagerV2.cpp:20:10: fatal error: CommCtrl.h: No such file or directory
- avoid clang warning: 5>..\src\WinControls\Grid\BabyGrid.cpp(677,7): warning : unused variable 'rectwhole' [-Wunused-variable]
- avoid ../src/NppCommands.cpp:1790:24: warning: conversion from ‘int’ to ‘UCHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
Close#15001
To be able to work with 2GB+ files, we have to use the Scintilla SC_DOCUMENTOPTION_TEXT_LARGE flag.
Until now, this flag was only used if a file > 2GB was to be loaded. For files smaller than 2GB or newly created empty ones, it was not used. This left the room for a Notepad++ crash situation because of the user has been left the possibility to cross this threshold (e.g. by pasting a data which in sum with the already existing ones in the Notepad++ filebuffer exceeds that 2GB...)
So one has two options: either a complex monitoring of the Notepad++ filebuffers size and reloading these with that large-flag when reaching the 2GB or simply using that large-flag as the default one from the start (which is what this patch does...).
Fix#14981, close#14982
- avoid upper/lowercase issue for #include <windowsx.h>
- casts to avoid warning: conversion from ‘int’ to ‘UCHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
- cast to avoid warning: conversion from ‘int’ to ‘BYTE’ {aka ‘unsigned char’} may change value [-Wconversion]
- avoid warning : delete called on non-final 'FileDialogEventHandler' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
- avoid warning : warning: extra ';' [-Wpedantic] in BabyGrid.cpp
Close#14950
Previously there was the 4096 MB max limit, so when e.g. user set this 4GB threshold and then tried to open any 2GB+ file, the Scintilla CellBuffer::Allocate method throwed a std::runtime_error because currently the Notepad++ does not use the SC_DOCUMENTOPTION_TEXT_LARGE in such a case.
The function "addHotSpot" can become very slow when the screen contains certain sequences of characters that look like URLs but are not valid, due to a form of backtracking. This change eliminates the possibility of backtracking.
This commit does two things:
First, it tightens the requirements for “looks like a URL” by checking the scheme earlier in the process. That is necessary to keep the next step from skipping valid URLs in reasonable contexts.
Second, once the beginning of a potential URL passes the tighter initial scanning and the end of the URL is found, we “commit” to that portion of the line. If the potential URL fails InternetCrackUrl validation, we restart scanning from the end of of the string that looked like a URL but wasn’t, rather than from just after the scheme.
Fix#13916, close#14900
The crash occurs because the thread terminates the task prematurely due to PostMessage’s nature. As a result, FileManager::backupCurrentBuffer() is always executed by the main thread, leading to a deadlock ( due to "std::lock_guard<std::mutex> lock(backup_mutex);") on the 2nd main thread’s entry and causing the crash. Here the explanation:
"If lock is called by a thread that already owns the mutex, the behavior is undefined: for example, the program may deadlock."
ref: https://en.cppreference.com/w/cpp/thread/mutex/lock
Using SendMessage instead of PostMessage ensures that the thread executes the task from the beginning to the end and keeps the mutex until the entire operation is terminated. Therefore, the race condition is prevented by the mutex lock while the 2nd thread tries to access the same code/zone.
Fix#14906, close#14917
Fix possible session backup swapping when no session.xml file.
The ReplaceFile WINAPI failed when the session.xml file replaced did not exist.
This commit follows the commit aa3777786dClose#14887
Fix memory overwriting bug by BabyGrid:
BabyGrid code was overwriting foreign memory on its initialization and deinitialization. At that time (WM_NCCREATE, WM_NCCALCSIZE, WM_CREATE and WM_NCDESTROY) the relevant FindGrid func returns -1, which was used as an index pointing to a memory area before the whole BGHS object (BGHS[-1]...)!
This was a long-standing hidden bug that only started to manifest itself probably when the app memory layout shifted somehow and important objects/data started to be overwritten, resulting in the visible app crashes.
Fix https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14855#issuecomment-2001066992 , https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14871#issuecomment-2002485089
=========
Sernario:
=========
When a user modifies a file in Notepad++, and the time of periodic backup (defaulted to 7 seconds) is reached, the backup of the modified file is being written. However, if a power outage occurs during this precise moment while the file is being written, file corruption may occur.
=======
Remedy:
=======
The goal is to maintain a non-corrupted file sample even during power outages. Here are the steps:
0. Begin
1. Write the file A as A.temp
2. Replace A by A.temp
3. End
During these steps, the cutoff can happen at any moment, but the user will always have a non-corrupted file sample (either A or A.temp).
=====
Note:
=====
The solution is only applied to "new #" files, since these files are generally small in length and do not have a second "physical" file existing on the hard drive.
ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/6133#issuecomment-1987037043Fix#6133, close#14860
In case of "session.xml" being corrupted after the power outrages, "session.xml.inCaseOfCorruption.bak" will replace "session.xml" on the next Notepad++ startup.
Fix#14781, close#14858