This PR removes Shift-DEL Ctrl-INS & Shift-INS shortcut from Scintilla.
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14401#issuecomment-1830302635
Now for Copy/Cut/Paste commands and their shortcut are coherent. ie. if user remaps the shortcuts of these 3 commands, both single/multiple selection operation with the commands in question will follow the changed shortcuts.
It also fixes 2 bugs:
1. visual glitch problem of read-only while multi-pasting.
2. the shortcut **Ctrl-C** in Search results works now.
Fix#14410, close#14423
Before the implementation of e9c50ed967,
Copy & Cut command were disabled when there were no selection, which makes sense because there was nothing to be copied & cut.
Now users can copy/cut current line without selection.
Fix#14401, close#14415
Update translation texts for these commits:
* [xml] Remove the redundant entry (faba181)
* Prevent Direct Write being set if user uses RTL (9bc790b)
Close#14386
The German translation is completely missing the word "case" (meant is "upper/lower case"). The literally translation of "Nur Übereinstimmung" would be "Match only", which doesn't capture the essence of the phrase.
Also it's "Mehrfachauswahl", not "Mehrfach-Auswahl".
Close#14361
Add translation texts for these commits:
* Make session inaccessible files remembered (part 2/2) (0879451)
* Force to enable multi-select feature in Scintilla (89278e1)
* Enhance Multi-select feature (cecd161)
* Enhance Find Dialog: display extra info in the status bar (05f339b)
Close#14275
The TabBar.h getTabIndexAt(int x, int y) could fail to find the tab-index (the underlying TCM_HITTEST WM returns -1, when there is no tab at the current mouse position).
Fix#14328, close#14329
* Shift-Delete: without selected text, it will delete the whole line.
* Ctrl-C: without selected text, it will copy the whole line.
* Ctrl-X: without selected text, it will cut the whole line.
Fix#14296, close#14298
- add first version of GH CI build
- fix merge issue for lexilla.mak
- fix clang compiler issue:
..\lexers\LexObjC.cxx(50,20): warning : unused function 'IsADigit' [-Wunused-function] [D:\a\notepad-plus-plus\notepad-plus-plus\lexilla\src\Lexilla.vcxproj]
- fix functionlist unittest run for github
- make functionList unittest compatible with newer powershell 7
Fix#12177, close#14291
Add "Multi-select All" & "Multi-select Next" for 4 modes to multi-select the occurrences respectively:
1. Match Case Only
2. Match Whole Word Only
3. Match Case & Whole Word
4. Ignore Case & Whole Word
Add also 2 commands "Undo the Latest Added Multi-Select" & "Skip Current && Go to Next Multi-select" for undoing latest added slection & skipping current selection and do the next one.
Users can asign the shortcuts to these 10 commands so multi-occurrence can be easily selected via shortcuts and be modified silmutanously.
This feature is inspired by: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8203#issuecomment-623712205Fix#8203, close#14295
To solve this issue, lambda removeMarker can be set to only remove just begin or end marker. By doing so, the process of merging adjacent hidden sections is limited and as a result, lines that shouldn't be hidden remain visible.
Fix#14166, close#14167
When Notepad++ installer with the '/S' optional param is used while a previously installed Notepad++ instance is running, it does not update the locked main 'notepad++.exe' binary, but the installer still reports success (exit code == 0, regkeys actualized according to the installer version used...).
Moreover - because the installation/upgrade then looks like it is done, some automatic update services like winget cannot be used until a next N++ version is released (winget erroneously reports that the current version is already installed...).
The fix consist to set error code and quit installer, when installer in silent mode, and there's an instance of Notepad++ open.
Fix#10189, fix#10277, fix#22514, fix#14236, fix partially #8514, close#14251
Fix incoherent behaviour of "Duplicate Current Line" menu command with its keyboard shortcut Ctrl-D, which duplicates also the selection.
Fix#5298, close#14255
New specs of NPPM_GETNBSESSIONFILES (which is retro-compatible):
======================
NPPM_GETNBSESSIONFILES
Retrieves the number of files to load in the session sessionFileName. sessionFileName should be a full path name of an xml file.
Parameters:
wParam [out]
BOOL* isValidXML, if this pointer is null, then this parameter will be ignored. TRUE if XML is valid, otherwise FALSE.
lParam [in]
const TCHAR * sessionFileName
Return value:
Returns 0 if sessionFileName is an empty string/NULL, or XML session file is corrupted/invalid, else the number of files.
======================
Other minor improvements:
- checking also for a possible ShellExecute errors
- removing the isAllSuccessful boolean, as it is no longer needed.
Fix#14228, close#14232
Following the commit: 4248c2ae22
If the user enables the option "Remember inaccessible files from past session" (disabled by default), and an opened session (the default session "session.xml" or a user session) contains one or several inaccessible files, a message dialog will appear, giving the user the choice to open or not open the placeholders. If the user chooses to open them, empty and read-only documents will be opened as placeholders for these inaccessible files.
Fix#12079, fix#12744, fix#13696, close#14252
Add the ability of "placrholders" (the empty document) for the inaccessible files of past session.
The inaccessible files from the current (default) session (i.e., session.xml) will not be lost in the next startup of Notepad++.
Furthermore, if file status detection is enabled in Notepad++ (default setting: ON), and the previously inaccessible files become accessible again (e.g., USB drive is inserted or network drive is remounted), the resurrected files can be reloaded on-the-fly without restarting Notepad++. The user will be prompted to reload if the placeholder is switched in.
Fix#12079, fix#12744, fix#13696, close#14168
Add translation texts for these commits:
* Fix data loss issue due to no room on disk for saving (e30ee85)
* Fix Wrong Categories in Shortcuts Mapper (39001d7)
* Make auto-checking of Find InSelection configurable (OFF or resizable) (591b00e)
* Dark mode tweaks and unicode size support for InSelection configurable size (b3179b5)
Close#14147
Set value to 0 to disable auto-checking "In Selection" checkbox in Find dialog.
Set any value to define the length of selected characters to auto-check "In Selection" checkbox in Find dialog.
The default and maximum value is 1024.
Fix#14108, fix#13677, fix#12639, close#14175
- update `stylers.model.xml` to have the 41 styles supported by LexPerl
- update `themes\DarkModeDefault.xml` to have the 41 styles supported by LexPerl
Fix #14192, close#14193
- update `autoCompletion\perl.xml` to auto-complete on the new keywords/built-in-functions/pragmas
- update `langs.model.xml` to syntax-highlight on the new keywords/built-in-functions/pragmas
Close#14191
Update scintilla with https://www.scintilla.org/scintilla537.zip
Release 5.3.7
Released 22 September 2023.
For GTK on macOS, fix popup window behaviour by setting type hints. Bug #2401.
For GTK, fix assertion failure on some systems when an INDIC_SQUIGGLEPIXMAP drawn for a zero-width character.
For Qt, allow parent window to handle context menu events by setting as ignored. Bug #2395.
For Qt, fix potential crash when using IME with large amount of text selected.
For Windows, fix building with non-English environment. Bug #2400.
and lexilla https://www.scintilla.org/lexilla527.zip
Release 5.2.7
Released 22 September 2023.
Fix building on Windows with non-English environment. Pull request #200.
Bash: fix line continuation for comments and when multiple backslashes at line end. Issue #195.
Bash: treat += as operator and, inside arithmetic expressions, treat ++ and -- as operators. Issue #197.
Bash: improve backslash handling inside backquoted command substitution and fix $ at end of backtick expression. Issue #194.
Bash: treat words that are similar to numbers but invalid wholly as identifiers. Issue #199.
Bash: consistently handle '-' options at line start and after '|' as identifiers. Issue #202.
Bash: handle '-' options differently in [ single ] and [[ double ]] bracket constructs. Issue #203.
F#: improve speed of folding long lines. Issue #198.
HTML: fix invalid entity at line end and terminate invalid entity before invalid character. Issue #192.
Fix#13991, fix#14062, close#14173
It will allow for the Notepad++ to be a "restartable app", like some other SW can do today (eg Google Chrome, Mozilla Firefox or all the Microsoft UWP apps).
This is to create a seamless experience wherein, if you have to reboot your PC, you can now pick back up from where you left off and resume being productive.
The OS app-restart feature needs at least Windows 10 (20H1) and the user has to switch on the "Restart apps" in the system Settings (subsection Accounts > Sign-in options).
Implemented as per previous discussion: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/12541#issuecomment-1332662024
To disable this feature, add "noRestartAutomatically.xml" into "%APPDATA%\Notepad++\" or Notepad++ installation directory.
Fix#9722, fix#11721, fix#11934, close#14074
With VS 2022 17.7 this error appears
Z:\DevStudio\Work\notepad-plus-plus\PowerEditor\src\WinControls\Preference\preferenceDlg.cpp(3374): error C26819: Unannotated fallthrough between switch labels (es.78). [Z:\DevStudio\Work\notepad-plus-plus\PowerEditor\visual.net\notepadPlus.vcxproj]
Close#14005
Add translation texts for these commits:
* Fix menu Tools contains 2 SHA-256 item while using localization (5b52386)
* Add SHA-512 hash features (4ffd897)
* [xml] Add missing entries in english.xml for SHA-1/SHA-512 (d7aee68)
* Add change history navgation commands (d9b9868)
* Fix inaccurate find/replace in files result while using invalid regexp (e7f7c31)
* Remove "Temporary doc site:" from localization files (c143a4a)
Close#13814
update to Scinitlla Release 5.3.6 (https://www.scintilla.org/scintilla536.zip)
Released 26 July 2023.
Redraw calltip after showing as didn't update when size of new text exactly same as previous. Feature #1486.
On Win32 fix reverse arrow cursor when scaled. Bug #2382.
On Win32 hide cursor when typing if that system preference has been chosen. Bug #2333.
On Win32 and Qt, stop aligning IME candidate window to target. It is now always aligned to start of composition string. This undoes part of feature #1300. Feature #1488, Bug #2391, Feature #1300.
On Qt, for IMEs, update micro focus when selection changes. This may move the location of IME popups to align with the caret.
On Qt, implement replacement for IMEs which may help with actions like reconversion. This is similar to delete-surrounding on GTK.
and Lexilla Release 5.2.6 (https://www.scintilla.org/lexilla526.zip)
Released 26 July 2023.
Include empty word list names in value returned by DescribeWordListSets and SCI_DESCRIBEKEYWORDSETS. Issue #175, Pull request #176.
Bash: style here-doc end delimiters as SCE_SH_HERE_DELIM instead of SCE_SH_HERE_Q. Issue #177.
Bash: allow '$' as last character in string. Issue #180, Pull request #181.
Bash: fix state after expansion. Highlight all numeric and file test operators. Don't highlight dash in long option as operator. Issue #182, Pull request #183.
Bash: strict checking of special parameters ($*, $@, $$, ...) with property lexer.bash.special.parameter to specify valid parameters. Issue #184, Pull request #186.
Bash: recognize keyword before redirection operators (< and >). Issue #188, Pull request #189.
Errorlist: recognize Bash diagnostic messages.
HTML: allow ASP block to terminate inside line comment. Issue #185.
HTML: fix folding with JSP/ASP.NET <%-- comment. Issue #191.
HTML: fix incremental styling of multi-line ASP.NET directive. Issue #191.
Matlab: improve arguments blocks. Add support for multiple arguments blocks. Prevent "arguments" from being keyword in function declaration line. Fix semicolon handling. Pull request #179.
Visual Prolog: add support for embedded syntax with SCE_VISUALPROLOG_EMBEDDED and SCE_VISUALPROLOG_PLACEHOLDER.
Styling of string literals changed with no differentiation between literals with quotes and those that are prefixed with "@". Quote characters are in a separate style (SCE_VISUALPROLOG_STRING_QUOTE) to contents (SCE_VISUALPROLOG_STRING).
SCE_VISUALPROLOG_CHARACTER, SCE_VISUALPROLOG_CHARACTER_TOO_MANY, SCE_VISUALPROLOG_CHARACTER_ESCAPE_ERROR, SCE_VISUALPROLOG_STRING_EOL_OPEN, and SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL were removed (replaced with SCE_VISUALPROLOG_UNUSED[1-5]). Pull request #178.
Fix#13901, fix#13911, fix#13943, close#13940
Also change open/save "Last Used Directory" behaviour - on last changed directory changed in open/save dialog dialog instead on pressing OK.
Fix #13914, close#13918
Currently we cannot accept e.g. the "\\?\C:\file.", but when someone tries to open the standard variant 'C:\file.', we should accept that, as this is the way how to work with filenames without an extension.
Fixes#12849, close#13888
One had to click on the Tools -> MD5 -> Generate from files... twice for showing up the dialog (only for the first time, next time it was ok).
Caused by the previous 'Add SHA-512 hash features' commit.
Close#13891
Currently, there is a bug in notepad++'s add extension feature only for Korean input after it was changed to hooking-based in the commit below.
b5a5baf#diff-eeb5624a35a43795da4eb970149a9ce7d22858b678a242affd2357520ea3e9f2R607
Bug
Attempting to save via Enter appends the last character to the extension.
Candidate mode is similar, with more varied issues depending on IME.
Cause
the hooking function is executed before the Hangul composition is completed and the last character is added after the extension.
Same for Candidate mode.
Workaround
It is almost impossible to fix issue 2 while maintaining the current Enter hooking
Exiting Candidate Mode can be done by pressing Enter, ESC, number key, or clicking on a candidate character, but there is too much code to cover all of these cases.
In addition, the Windows input framework is fragmented into IMM and TSF, and various IMEs have different implementations, so it is almost impossible to determine the state of Candidate or Hangul composition through IME hooking.
I have seen differences in the events fired by different Windows versions and different IME programs for the same IME behavior.
This PR solves problem 1 and partially solves problem 2 by not saving with Enter when in Hangul mode.
Fix#11582, fix#12225, fix#12366, close#13788
Use reference instead of copy for the sorting result.
Also improve lines sorting performance slightly: Sorting a 200 MB text file takes 13.71 seconds instead of 14.63 seconds.
Fix#10435, close#13852
Enables the folding capabilities of Lexilla's Assembly lexer by:
- adding the currently [unused keyword groups], `Directives4Foldstart` and `Directives4Foldend`;
b5e2e9d737/lexilla/lexers/LexAsm.cxx (L101-L109)
- adding some fold-trigger keywords to the new `Directives4Foldstart` and `Directives4Foldend` groups, and *duplicating* them in the existing `Directives` group, following [these instructions].
- activating a *selection* of the lexer's [optional folding properties]. Since `fold.asm.comment.explicit` is not likely to be popular, the default delimiters `;{` and `;}` are permanent, and `fold.asm.explicit.anywhere` is *not* turned on. Users who want different options can always use [Python Script] to set them dynamically.
There are plenty of *more* candidate keywords than what I've added, but I'm not very familiar with [Microsoft's macro assembler].
Fix#13758, fix#9888, close#13762
Update translations for these commits:
* GUI Enhancement: User Define dlgs (052626c)
* Make all the localization files pretty printed (3c15ff5)
* GUI Enhancement: Plugins Admin dialog (4e0f504)
* GUI enhancement: Find in Finder dialog (af8b339)
* GUI Enhancement: General & Editing sections in Preferences dialog (a1d7db8)
* GUI Enhancement: About, Debug, Save dialogs (1806b89)
* Add "open new blank document in addition on startup" ability (61503a2)
Close#13697
To test fix, try making file
```
f
f
```
and recording macro of find/replace form searching for f, then running until EOF.
This does not break any existing behavior, including:
- macros where the cursor moves towards EOF but line num doesn't change (those already stopped after one iteration)
- macros where line(s) are deleted with every iteration (even if line number doesn't change, they run until file empty)
- macros where the line number increases with each iteration
- macros where the cursor advances up or down with each iteration but would eventually stop anyway (those end at the correct time)
Fix#13342, close#13587
To enable/disable this feature, go to New Document section of Preferences dialog, and check/uncheck "Always open a new document in addition at startup" checkbox.
Fix#11134, fix#9535, fix#5527, close#13738
When session.xml is written while Notepad++ exit, it'll be load for checking if it's an valid xml file.
If not, then it will be replaced by the old session file (if any).
This commit renames session.xml to session.xml.fail2Load so in case of the situation user can provide session.xml.fail2Load to devs for analyzing.
Ref #13694Close#13741
update to Scinitlla Release 5.3.5 (https://www.scintilla.org/scintilla535.zip)
Released 31 May 2023.
On Win32, implement IME context sensitivity with IMR_DOCUMENTFEED. Feature #1310.
On Win32 remove dependence on MSIMG32.DLL by replacing AlphaBlend by GdiAlphaBlend. Bug #1923.
On Qt, stop movement of IME candidate box.
On Qt, report correct caret position within paragraph for IME retrieve surrounding text.
On Qt for Cocoa, fix crash in entry of multi-character strings with IME.
and Lexilla Release 5.2.5 (https://www.scintilla.org/lexilla525.zip)
Released 31 May 2023.
Add CharacterSetArray constructor without setBase initial argument for common case where this is setNone and the initialSet argument completely defines the characters. This shortens and clarifies use of CharacterSetArray.
Bash: implement highlighting inside quoted elements and here-docs. Controlled with properties lexer.bash.styling.inside.string, lexer.bash.styling.inside.backticks, lexer.bash.styling.inside.parameter, and lexer.bash.styling.inside.heredoc. Issue #154, Issue #153, Feature #1033.
Bash: add property lexer.bash.command.substitution to choose how to style command substitutions. 0 → SCE_SH_BACKTICKS; 1 → surrounding "$(" and ")" as operators and contents styled as bash code; 2 → use distinct styles (base style + 64) for contents. Choice (2) is a provisional feature and details may change before it is finalized. Issue #153.
Bash: fix nesting of parameters (SCE_SH_PARAM) like ${var/$sub/"${rep}}"}. Issue #154.
Bash: fix single character special parameters like $? by limiting style. Issue #154.
Bash: treat "$$" as special parameter and end scalars before "$". Issue #154.
Bash: treat "<<" in arithmetic contexts as left bitwise shift operator instead of here-doc. Issue #137.
Batch: style SCE_BAT_AFTER_LABEL used for rest of line after label which is not executed. Issue #148.
F#: Lex interpolated verbatim strings as verbatim. Issue #156.
VB: allow multiline strings when lexer.vb.strings.multiline set. Issue #151.
Close#13729
Correct the logic when inserting external lexer's language into language menu,
while inserting external lexer's language into language menu, also search in submenu if compact language menu is used.
Fix also a similar issue in Preferences dialog when enabling a previously disabled language.
Fix#9516, close#13660
- increase width for some items for translation
- make translation consistent between source and xml files
- reorder items for consistent tab focus
Ref #13627, ref 0cad36d#r108675058
Fix#13657, fix#13676, close#13632
The old explorerContextMenuEntryLocal.ini file is no longer used, and
keeping it here causes confusion with people adding pull requests to
update it.
This removes it, along with the .gitattributes file, since it is no
longer needed with the ini file gone.
Close#13662
* Update translations for these commits:
* Add hide/show ability of Control Characters (C0 & C1) and Unicode EOL (0cad36d)
* Enhance Run Macro dialog (87e34c1)
* Backup old version of shortcuts.xml (5b5c30b)
* GUI enhancement: Find Characters in Range dialog (997ef82)
* GUI enhancement: MD5 and SHA256 Hash dialogs (7e6c4b3)
* GUI Enhancement: Preference Print sub-dialog (6b19445)
* Some translations are modified to be clear.
Close#13518
- main dlg shared part - tab focus reorder
- string dlg (User language name, New tab name) - make edit ctrl larger
- remove obsolete style
- add initializer
- fix override warnings
- optimize dark mode
- make translation consistent between source code and english lang xml files
Fix#13615, close#13616
Commit 5b5c30b0d3 backup current shortcuts file before rewritting it, and gives a warning to users.
However, when a PC installs v8.5.3 (or later version) from scratch (ie. no v8.5.2 or previous version installed), there should be no warning and no backup.
This commit remove unnecessary cases for warning user (and backup shortcuts file).
Enhance #13589 & #13599Close#13609
An enhancement (fff5f9b - it will be in v8.5.3) makes Macro & Run menu completely localizable. However, it will bring a regression and critical bug for all macro recorded by v8.5.2 and previous versions.
In order to remedy this issue, shortcuts.xml will be copied to shortcuts.xml.v8.5.2.backup before being written. So user can recover backup file if they want to back to v8.5.2 or previous version with the old data.
Fix#13589, close#13599
The macro/run commands menu folder (submenu entry) can be UTF8 characters.
After modification of macro/run shortcut commands, the macro/run menu UTF8 folder names can be saved correctly by this commit, but in Unicode character number form instead of human readible characters.
Fix#12670, close#13516
While there are the UDL in the userDefineLangs folder (new system) and a (or some) UDL in "userDefineLang.xml" (old system). The complete UDL deletion in "userDefineLang.xml" not remove "userDefineLang.xml" file.
This PR fixes the problem.
Fix#8101, close#13513