This native implementation of UAC (User Account Control) operations in Notepad++ is designed not only to substitute the deprecated & problematic NppSaveAsAdminPlugin - which interferes with the FlushFileBuffers WINAPI used by Notepad++ - but also to support any future Notepad++ feature which may require elevated privileges.
When a user attempts an operation that fails due to indufficient rights, the system performs only that specific requested action with elevated privileges. After completing it, the elevated Notepad++ instance immediately exits, returning the user to his/her original Notepad++ instance seamlessly, as if nothing unusual occured.
This mechanism is independent of any Notepad++ features such as backup-snapshot or multi-instance mode. All UAC-related operations are executed at the very beginning of the wWinMain function, ensuring they are not affected by mutex handling, or other internal logic.
Importantly, this approach eliminates the need for a separate signed helper executable like NppAdminAcess.exe. Everything is handled within the main Notepad++ project, just as before.
In this commit, the NPP_UAC_SAVE, NPP_UAC_SETFILEATTRIBUTES & NPP_UAC_MOVEFILE are implemented.
Summary of the changes:
added last _dwErrorCode in:
.\PowerEditor\src\MISC\Common\FileInterface.h
.\PowerEditor\src\MISC\Common\FileInterface.cpp
FileManager::saveBuffer adjustment for the NPP_UAC_SAVE_SIGN in:
.\PowerEditor\src\ScintillaComponent\Buffer.cpp
N++ UAC ops signatures definitions & new invokeNppUacOp common func, toggleReadOnlyFlagFromFileAttributes func adjustment for the NPP_UAC_SETFILEATTRIBUTES_SIGN in:
.\PowerEditor\src\MISC\Common\Common.h
.\PowerEditor\src\MISC\Common\Common.cpp
only to fix Notepad_plus::doSave for isEndSessionCritical() in:
.\PowerEditor\src\NppIO.cpp
added getLastFileErrorState() & m_dwLastFileError in:
.\PowerEditor\src\Utf8_16.h
.\PowerEditor\src\Utf8_16.cpp
UAC ops handling at the very start of wWinMain + added new NPP_UAC_ handling nppUacSave and nppUacSetFileAttributes funcs in:
.\PowerEditor\src\winmain.cpp
Fix#886, fix#8655, fix#9561, fix#10302, fix#14990, fix#15008, fix#15137, fix#15323, close#16933
1. Change the order of GUI items to make the insert mode (dec/hex/oct/bin) more explicit.
2. Reduce the showing time of the warning baloon tip from ~10 seconds to 3.5 seconds.
3. Use ESC keystroke to cancel the warning baloon tip.
ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16931#issuecomment-3236582042
Note that while the baloon tip showing then clicking on the upper-right 'X', the dialog won't be closed. Instead, the baloon tip will be cancel.
Curiously, clicking on the "Cancel" button under the same context closes the dialog.
The reason could be, while the "Cancel" button being clicked, the focus is changed and the system hides the baloon tip. Whereas the click on the upper-right 'X' doesn't make the focus changed, then the system does nothing.
Anyway such behaviour is a bug, but can happen very rarily.
Close#16959
1. More understandable naming: "javascript.js" to "JavaScript".
2. Disassociate the value of Embedded JS & JavaScript, and remove Embedded JS from the list.
3. Prevent from eventual crash due to null pointer.
Fix#16884, close #16885
* The search input length has been extended from (2048 - 1) up to (16384 - 1) characters.
* For saving find input history, only search strings shorter than 2048 characters will be stored for the next session.
* The tooltip warning is displayed in both cases above.
Fix#16749, fix#1088, close#16855
Info:
```
Microsoft Visual Studio Community 2022
Version 17.14.0
VisualStudio.17.Release/17.14.0+36109.1
Microsoft .NET Framework
Version 4.8.09032
Installed Version: Community
Visual C++ 2022 00482-90000-00000-AA924
Microsoft Visual C++ 2022
...
```
Close#16581
Themes should not mess up monospacing by changing font size for only certain languages/styles: they should all inherit their font-size from the Default Style in that theme
Fix#16667, close#16756
Fix toggling "Read-only attribute in Windows" command wrong behaviour due to invalid file attribute(s) or insufficient user rights.
Fix#16734, close#16733
So user can toggle (set/remove) R/O attribute of a file.
Note: only 42033 (Clear Read-Only Flag) but not 42028 (Set Read-Only) entries are removed from the localization files.
Because 42028 (Set Read-Only) command is only reworded, its functionnality remains the same.
Whereas 42033 (Clear Read-Only Flag) command has changed its behaviour, hence the deletion.
Though 42028's translation of "Set Read-Only" can be remained, the translators are suggested to reword your translation with "Read-Only in Notepad++" in order to avoid the confusion of users.
Fix#326, fix#4594, fix#6216, fix#7841, fix#12520, fix#15571, fix#16603, close#16686
Make translation up-to-date:
• Translate "Use the first line of document..." (commit abc2371)
• Add missing labels (commit 393815b) + a small adjustment (file header & version)
• Translate Locale-based line sort feature (commit a9d8dca)
• Make some expressions even more appropriate / user friendly
• Add/Place some accelerator letters more precise
Close#16632
- enable to use in generic dark mode subclass for plugins
- handle more styles (button style, usage of icons)
- double buffer to avoid flicker
- focus rect when keyboard is used for navigation
Fix#16668, close#16673
Release 5.5.7 (https://www.scintilla.org/scintilla557.zip)
Released 8 June 2025
1. Add SCI_SCROLLVERTICAL method to restore view position and maintain it while performing line wrapping.
2. Add SC_UNDO_SELECTION_HISTORY_SCROLL flag to SCI_SETUNDOSELECTIONHISTORY which controls whether undo and redo restore vertical scroll position.
3. Tweak SC_MARK_BAR to be slightly wider by using next higher whole pixel instead of next lower for margin width / 3.
4. Scale images in autocompletion lists with SCI_AUTOCSETIMAGESCALE to match high DPI screens. Initially only on GTK and Qt.
5. Fix wrapping bug for UTF-8 where \r\n could wrap between the characters. Notepad++ Pull Request #16373.
6. Fix crash during painting when scroll bars changed. Bug #2481.
7. On GTK, reset vertical scroll bar synchronously in SCI_SETDOCPOINTER to fix bug where scroll position not restored in non-wrap mode. Bug #2416.
8. On GTK, fix IME problem when tentative composition interfered with delete surrounding. Feature #1476.
9. On GTK, update IME cursor position inside retrieve surrounding to better position candidate window. Feature #1488.
Release 5.4.5 (https://www.scintilla.org/lexilla545.zip)
Released 8 June 2025
1. Dart: Add error state SCE_DART_STRINGEOL for unterminated string. Pull request #315.
2. Makefile: Add a keyword list to makefile lexer to highlight GNU Make directives like 'ifdef' and 'vpath' as SCE_MAKE_PREPROCESSOR since these are similar to NMAKE directives like '!IFDEF'.
3. Nix: Add error state SCE_NIX_STRINGEOL for unterminated string. Pull request #315.
4. TOML: Add error state SCE_TOML_STRINGEOL for unterminated string. Pull request #315.
5. Zig: Add error state SCE_ZIG_STRINGEOL for unterminated string. Pull request #315.
Close#16649
The regression is introduced by:
83755ca155 (diff-d88ddee57a027ab23daf332c4778ced0cee352edcb34efdda1b218e8a75c61b2L2636)
The culprit of this regression is the deletion of following 4 lines in the commit above:
```
void ScintillaEditView::fold(size_t line, bool mode, bool shouldBeNotified/* = true*/)
{
auto endStyled = execute(SCI_GETENDSTYLED);
auto len = execute(SCI_GETTEXTLENGTH);
if (endStyled < len)
execute(SCI_COLOURISE, 0, -1);
```
The method "ScintillaEditView::fold()" is called not only on manual folding by the users, but also on:
1. startup's loading session to restore the folding state programmatically.
2. after startup, switching among the documents to restore the folding state programmatically.
The above lines are important for the case 1.
However, these lines are necessary only on the first load of each file after the startup of Notepad++.
"execute(SCI_COLOURISE, 0, -1);" needs to be run for once (the case 1), not twice or more (the case 2).
So if there's a way to detect if a document has been run "execute(SCI_COLOURISE, 0, -1);" once (in the case 1),
and don't run it again (the case 2), it will save the time to switch among the document.
Fix#16597, close#16599
- disabled versions with usage of Sci_PositionCR restricted to 2GB files on windows
- didn't adapt ScintillaStructures.h yet to avoid disabling/patching of functions for SCI_GETTEXTRANGE, SCI_FINDTEXT, SCI_GETSTYLEDTEXTFULL and SCI_FORMATRANGE already now
Ref: discussion at https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16467Close#16522
Fix swiching back to document which has processed hide lines makes Notepad++ unresponsive due to an infinite loop.
Fix also setting language makes hiding lines unhidden issue.
Fix#16316, close#16512
Fix double clicking chosen command in ShortcutMapper displays wrong shortcut due to the bad index.
- there was off-by-1 when building the oemVkUsedIDs vector, which was caused by using the index based on .size() instead of .size()-1 to get the most-recently-added.
- also cleared the vector each launch of the dialog, because the .push_back() was causing the vector to grow without bounds, messing up the indexing on subsequent runs of the dialog, causing it to pick _none_ of the entries.
The regression was introduced by:
6dfbc1f7e8Fix#16491, close#16492
Previously, a Notepad++ editor user activity or focus switching was needed for enabling possible clipboard Paste after a successful Copy command.
Fix#16456, close#16458
Release 5.5.6 (https://www.scintilla.org/scintilla556.zip)
Released 2 April 2025.
* Disallow changing case of protected text. Bug #2463.
* Return enumeration type from MarkerSymbolDefined to match MarkerDefine. Bug #2469.
* On Win32, use DirectWrite for autocompletion lists when DirectWrite chosen for document text.
* On Win32, optimize case-insensitive DBCS search to be around 5 times faster by using 64K memory to cache folding data for each DBCS code page used.
* On Win32, fix a crash with bidirectional text.
* When using Visual C++ through nmake, fix building for ARM64. Feature #1546.
* On Qt, draw clipped UTF-8 text correctly. Bug #2464.
* On Qt, avoid a dwell start when the mouse is moved outside the Scintilla widget. Bug #2466.
* On Qt, autoCompleteSelection converts from local encoding when not in Unicode mode. Bug #2465.
Release 5.4.4 (https://www.scintilla.org/lexilla544.zip)
Released 2 April 2025.
* Fix building for ARM64. Pull request #308.
Close#16373
Before, a missing npcNoInputC0 config.xml entry caused the feature to incorrectly reset to false/no (the default for any missing config.xml boolean setting) during the first launch of the Notepad++.
Fix#16326, fix#15839, fix#15729, close#16338
Make right-click message handler x-margin calculation right.
Previously, the incorrectly used unsigned variable (size_t) overflowed with negative numbers due to incorrect calculation of margin size.x (where possible horizontal scrolling was not taken into account...).
Fix#16325, close#16332
Fix plugin button hidings settings being ignored bug in toolbar button config,
if the value of "hideAll" attribute of "Standard" node in "toolbarButtonsConf.xml" is set to "yes".
Fix#16280, close#16285
Release 5.5.5 (https://www.scintilla.org/scintilla555.zip)
Released 25 February 2025.
Remember selection with undo and redo. Controlled with SCI_SETUNDOSELECTIONHISTORY. Feature #1273, Bug #1479, Bug #1224.
Serialize selection type and ranges with SCI_GETSELECTIONSERIALIZED and SCI_SETSELECTIONSERIALIZED.
For Win32, update Direct2D and DirectWrite interfaces used to 1.1 and add a lower-level approach to calling DirectWrite 1.1 by specifying SC_TECHNOLOGY_DIRECT_WRITE_1. Since Windows Vista does not support these API versions, Scintilla o longer supports DirectWrite on Windows Vista and will fall back to using GDI.
Fix segmentation of long lexemes to avoid breaking before modifiers like accents that must be drawn with their base letters. For wrapping, try to break lines without separating letters from modifiers.
For GTK on Windows, replace reverse arrow cursor with hand as reverse arrow was small in scaled modes. Bug #2460.
Fix bug on Qt where double-click stopped working when Scintilla instance had been running for weeks.
Release 5.4.3 (https://www.scintilla.org/lexilla543.zip)
Released 25 February 2025.
C++: Fix evaluation of != in preprocessor condition. Issue #299.
Modula-3: Allow digits in uppercase identifiers. Issue #297.
Pascal: Fix asm style extending past end. Issue #295.
Python: Fix detection of attributes and decorators. Issue #294, Pull request #302.
Ruby: Implement substyles for identifiers SCE_RB_IDENTIFIER.
Ruby: Recognize name as SCE_RB_DEFNAME in def when `::` used as well as `.`. Issue #300.
Close#16235
Synchronize FunctionList panel with the current tab/buffer syntax set.
Ensures automatic switching to the currently used tab/buffer lang.
Before, the FunctionList remained populated according to the previously used lang, even if the user switched to a different one. In such a case a manual FL-reload/re-init was needed.
Fix#16221, close#16245
Move IDC_CHECK_BACKSLASHISESCAPECHARACTERFORSQL BM_SETCHECK from IndentationSubDlg processing to LanguageSubDlg processing to fix the regression in v8.7.
Fix#16249, close#16253
Consolidated updates since v8.7.3:
• Add "User Defined Languages online help"
• Make some translations more professional
• Make translation up-to-date (adding support for other Scintilla rendering modes)
Close#16209
Usage:
Move & rename toolbarButtonsConf_example.xml to %APPDATA%\Notepad++\toolbarButtonsConf.xml, modify the XML file content & save it in your favorite editor (Notepad++, whatelse? ;) ), then relaunch Notepad++.
This PR simplies largely the logic of PR #15999 to make the code maintainable.
Fix#15106, fix#15440, fix#16000, close#16216
- Use the Scintilla dedicated command SCI_FOLDALL to replace the inefficient loop for "Fold All" command.
- Fix "Fold level" & switching back to large files folding performance.
- Refactoring the hide/show lines functions.
Note that there might be a regression of URL link:
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16200/files#r1961937279
The commit is based on code of #16064.
Fix#16064, close#16200
Enable Sctintilla's SAS lexer, populate langs.model, stylers.model, and themes.
(includes keyword lists from UDLs, notepad4, and SAS documentation)
Fix#16148, close#16183
Add **NPPM_ADDSCNMODIFIEDFLAGS** message for plugins which need the SCN_MODIFIED notification of other events.
BOOL NPPM_ADDSCNMODIFIEDFLAGS(0, unsigned long scnMotifiedFlags2Add)
Add needed SCN_MODIFIED flags so your plugin will recieve the notification SCN_MODIFIED of these events for your specific treatments.
By default, Notepad++ only forwards SCN_MODIFIED with the following 5 flags/events SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT | SC_PERFORMED_UNDO | SC_PERFORMED_REDO | SC_MOD_CHANGEINDICATOR to plugins.
If your plugin need to process other events of SCN_MODIFIED, you should add the flags you need by sending this message to Notepad++, just after recieving NPPN_READY.
wParam: 0 (not used)
lParam[in]: scnMotifiedFlags2Add- Scintilla SCN_MODIFIED flags to add.
Return TRUE
Ref: https://community.notepad-plus-plus.org/topic/26588/notepad-v8-7-6-released/2?_=1738167940554Fix#16121, close#16120
Close#16093
Up-to-date Hungarian language file:
• Show buttons on inactive tabs
• Shorter Menu Settings/Preferences
• HowToReproduce comment (FindCharRangeValueError)
• Search and Shortcuts warnings (FindAutoChangeOfInSelectionWarning and Need2Restart2ShowMenuShortcuts)
This fixes a regression caused by PR #15236 (Fix for the "lost" panels problem).
As the Virtual Screen in the extended multi-monitor mode can start not a the point 0,0 (as the primary monitor does) but also at some negative coordinates, we have to deal with it.
The MS Virtual Screen concept ref:
https://learn.microsoft.com/en-us/windows/win32/gdi/the-virtual-screenFix#15498 , fix#16077, close#16079
When application is first loaded, it scans through the VK mappings on the active keyboard, and for the keyboard-specific keys (focused on the VK_OEM_# and similar keys), it will read what Windows says is the actual character associated with that virtual key code, and will populate a mapping for display purposes; when Notepad++ is showing the shortcut keys in menus or in the Shortcut Mapper, it will display the keyboard-specific character rather than the default en-US character.
(Debugged locally using Windows' `osk.exe` virtual keyboard app, and users with alternate physical keyboards have verified it for me as well, including the original requester.)
Fix#15966, Fix#14395, close#16072
Release 5.5.4 (https://www.scintilla.org/scintilla554.zip)
Released 18 December 2024.
Update to Unicode 15.1. Issue #285.
Improve performance of SCI_BRACEMATCH. Feature #1533.
Improve performance of DBCS text. Feature #1535.
Fix wrapping removed lines. Bug #2456.
Fix moving line down to empty final line and moving empty final line up. Bug #2457.
On GTK, allow middle click to insert multiple times within a document. Geany Issue #2629.
Release 5.4.2 (https://www.scintilla.org/lexilla542.zip)
Released 18 December 2024.
Update to Unicode 15.1. Issue #285.
Lexer added for Nix "nix". Pull request #282.
JavaScript: Use correct SCE_HJA_TEMPLATELITERAL style for server-side template literals in HTML instead of client-side style. Issue #286.
JavaScript: Use correct SCE_HJ_SYMBOLS style for '.' after regex instead of SCE_HJ_WORD. Prevent empty word assertion when non-word character after regex flag. Issue #289.
PHP: Fix unstable lexing with substyled keyword and unterminated string. Issue #288.
Rust: Add C string and raw C string literal styles SCE_RUST_CSTRING and SCE_RUST_CSTRINGR. Pull request #292, Issue #268.
TOML: Don't treat keys without values as errors. Pull request #283.
Zig: Add SCE_ZIG_IDENTIFIER_STRING for identifiers expressed as strings. Pull request #287.
Fix#15817, fix#10528, fix#15801, close#15982
Updates for v8.7.3:
• Updated header and versioning to be more trackable/understandable
• Added translation of missing (un)pin operations
• More consistent translation of tab operations
Close#15910
- increased DEFAULT_MILLISEC constant from 1000 to 3000 (some slower networks obviously cannot respond within the previous 1sec response timeout).
- the problematic situation was apparently made worse by the fact that the Buffer::checkFileState() did not issue one GetFileAttributesEx call but also an unnecessary second one (this was probably caused by an incorrect transcription of the previous version of this func for the new non-blocking thread method of calling the GetFileAttributesEx).
- other problem was that the checking func did not check at all whether the threaded call to the GetFileAttributesEx succeeded or had to be forcibly terminated from the main app thread and expected successful calling only.
- the nppLogNetworkDriveIssue logging has been enhanced.
- added option to check possible WIN32API error code of the threaded GetFileAttributesEx call from the main N++ thread.
Fix#15819, close#15936
When Notepad++ portable version changes its path (move/rename), the periode backup files (unsaved documents) are lost on the next session, due to the absolute paths in session files. This commit fixes the issue by ensuring the backup path matches with such documents.
Fix#1587, fix#15886, close#15942
Update _mainWindowStatus before switchEditViewTo for fixing hidden document-view after deleting files in both views from outside.
Fix#15922, close#15923
Update translation texts for these commits:
* Rename an option in Preferences dialog to fit other settings (2c1212c)
* Add Pin/Unpin Tab context menu item (287c85f)
* Update localization files to v8.7.3 (16da20e)
Close#15876
The regression is introduced by commit: c021c86195
Only returning BUFFER_INVALID in FileManager::loadFile immediately if the file size check == -1. This is a must here because of the following code does not expect such -1 in fileSize.
But an error msg is not appropriate here, as it could also be a legal attempt to open a dir (with files inside) or an attempt to use the N++ globbing feature.
This early return also speeds up the loading stage a bit.
Fix#15869, close#15870
Complete and up-to-date re-translation of the Hungarian language file, including:
• Translating the missing terms
• Adding missing accelerator letters (also for dialogs)
• Correcting the previous spelling errors (e.g. capitalization)
• Re-translating the inaccurate expressions more accurate
• Re-translating the outdated terms
Close#15824
Update translation texts for these commits:
* Add "Close to system tray" in MISC preference (035ef19)
* Improve GUI for commands for the system tray in Preferences (cd45afc)
Close#15693
Release 5.5.3 (https://www.scintilla.org/scintilla553.zip)
Released 19 October 2024.
On Win32 change direction of horizontal mouse wheel and touchpad scrolling to match other applications. Bug #2449.
Release 5.4.1 (https://www.scintilla.org/lexilla541.zip)
Released 19 October 2024.
Lexer added for Dart "dart". Pull request #265, Pull request #275.
Lexer added for troff / nroff "troff". Pull request #264.
Lexer added for Zig "zig". Pull request #267.
C++: Fix crash for empty documentation comment keyword where '<' occurs at line end.
F#: Include EOLs in the style range of SCE_FSHARP_COMMENTLINE. Stabilizes EOL detection when folding line comment groups. Issue #276.
F#: Fix per-line folding in F# documents. Issue #277.
HTML: Improve SGML/DTD lexing. Don't terminate SGML when > inside quoted string. Lex both [ and ] as SCE_H_SGML_DEFAULT. Nested sections handled instead of switching to SCE_H_SGML_ERROR. Issue #272.
JavaScript: New SCE_HJ_TEMPLATELITERAL and SCE_HJA_TEMPLATELITERAL styles for template literals when lexer is hypertext, or xml. Issue #280.
PHP: Fix failure to recognize PHP start "<?php' at end of document. Caused by not capping retrieval range at document end causing no text to be retrieved. Issue #269.
Smalltalk: Fix scaled decimal numbers without decimal separator. Pull request #274.
Fix#15228, fix#15368, fix#15650, close#15717
STR:
1. Open a network file.
2. Close Notepad++ to have it in the session.
3. Disconnect the network, and launch Notepad++ immediately.
4. Around more than 1 minute's delay, then the "Error" dialog displayed.
The reason for the hanging is that the network file was incorrectly detected by doesFileExist (GetFileAttributesEx) as present, leading Notepad++ to attempt opening a non-existent file with _wfopen. This issue seems to stem from a caching mechanism within the IO function (GetFileAttributesEx). When the network disconnects, the cache is not immediately cleared, causing GetFileAttributesEx to falsely report that the file exists. Consequently, when Notepad++ is launched after a network disconnection, GetFileAttributesEx retains its cache, indicating the file exists, while _wfopen fails to locate the network resource, resulting in a hang.
Unfortunately, there's no efficient solution for this problem. The commit's remedy is to check if the file is on the network and whether its directory still exists. If the directory doesn't exist, we avoid calling _wfopen. We verify the directory's existence instead of the file itself because the cache issue with GetFileAttributesEx occurs before _wfopen is executed. Checking the directory avoids the cache problem due to the identical argument being used.
I've tested this remedy in debug mode, and it works fine. However, the problem persists in release mode. Despite this, I believe it's worth keeping this solution, as it provides some protection in a variable network environment, potentially mitigating the issue when it arises.
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/15658#issuecomment-2386662974
Improve #4306, #6178, #8055, #11388, #12553, #15540, close#15701
This PR prevent hanging when user: Open a network file, modify it. Disconnect the network, then save the file.
It also prevents the zombie process due to blocked CreateFile left behind.
Remove the timeout thread for CreateFile to prevent the zombie process. Use another way for the detection:
If the result of network file existent detection is false, and the network problem found (timeout reached), we just stop and don't call CreateFile routine.
Ref: 1445487
Improve #4306, #6178, #8055, #11388, #12553, #15540
Add thread for CreateFile to fix saving disconnected network file hanging.
STR: Open a network file, modify it. Disconnect the network, then save the file. A huge latency (more than 1 minute) can be observed.
Not that the crash is not reproducible anymore by this PR. If any crash happens for you, please let me know (with the STR).
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/15669
Improve #4306, #6178, #8055, #11388, #12553, #15540Close#15679
Context: While the network file is disconnected, it's considered non-existent and might to be deleted.
The reason of crash:
"doClose" on the same buffer happens twice while users clicks X button, then chooses "No" when they are asked whether if this file should be kept in editor.
Explanation:
When user clicks X button on the tab of the file in question to close it, "activateBuffer" is called, then "fileClose" is called.
* activateBuffer: Following "activeateBuffer" call in the depth, "checkFileState" is invoked - that leads the message "The file "xxxxxx" doesn't exist anymore. Keep this file in Editor?". If user clicks on No, "doClose" will close the tab and destroy the buffer.
* fileClose: in "fileClose" call, "doClose" will be invoked and try to close the already-destroyed buffer.
Solution:
Retrieve the buffer ID once again, after "activateBuffer" call, for comparing with old buffer ID. If the buffer was destroyed, the new retrieved buffer ID is not the same.
Note: this commit fixes the crash, but it doesn't fix the misbehaviour: If user clicks on "Yes" to answer the message "The file "xxxxxx" doesn't exist anymore. Keep this file in Editor?", the tab will be still closed.
Fix#15684, close#15685
Refactoring for reducing the I/O calls, fix typos.
Reduce the startup time (while the a dirty disconnected network file is in the session) from about 12-15 seconds to about 6 seconds (on my laptop).
Note that there are 2 cases are not improved by the commit:
* STR 1: Open a network file, modify it. Disconnect the network, then save the file.
There will be a huge hanging time (around 1 minute) to get the warning dialog.
I tried to remedy with thread for CreateFileW in the constructor of Win32_IO_File, however it leads crash due to the lock guard in the caller.
* STR 2:
1. Open a network file.
2. Close Notepad++ to have it in the session.
3. Disconnect the network, and launch Notepad++ immediately.
4. Around more than 1 minute's delay, then the "Error" dialog displayed.
The reason of hanging is that the network file was detected by "doesFileExist" as true, so Notepad++ was trying to open non-existent file (by _wfopen).
I believe that there's some kind of cache during the very short period for the IO function (here's our case GetFileAttributes), and such cache is not immediately synchronized (cleared) while network disconnected. As a result, when we launch Notepad++ after the disconnection of network, GetFileAttributes keeps its memory & responds "FileExists". However for _wfopen it doesn't see the resource of network anymore - that makes hanging.
Ref #15658
Improve #4306, #6178, #8055, #11388, #12553, #15540Close#15669
The issue is due to WinAPI's GetFileAttributes function can take a huge amount of time in various situations, like when the target server being offline (usalally).
The current solution is to wait at least 3 seconds for each GetFileAttributes function, then return the default value in case of the problem (or the returned value of the function, in case of normal situation - if it has been executed completely during the 3 seconds).
So there'll still be the hanging time (3 or 6 seconds) while the problem of network connection, but the hanging time (it could be 30 seconds more) is reduced considerablly.
"Wow64EnableWow64FsRedirection" call is also removed from x64 build (in which this call is unnecessary) in this commit to reduce the IO calls.
Fix#4306, fix#6178, fix#8055, fix#11388, fix#12553, fix#15540, close#15658
Note: while create the new tab (empty & clean), there will be a created time displayed. When the document is modified and period backup feature is enabled, a new created time will be assigned and displayed. However, the time of the first modification which makes empty document dirty will be remained as the tab creation time, even with several modification afterward.
Fix#15563, close#15651
Update translation texts for these commits:
* Make C-Like indent deactivatable (439bbb0)
* Improve description for settings "Backup" (108b9f0)
* Add missing localization for debug info dialog and print error (ea5e36a)
Close#15455
Fix Notepad++ Debug binary crash issue while opening some special files (crash after some "Assertion fail" message boxes).
Only the Debug binary is impacted. There's no issue for the release binary, so it's not a "security vulnerability".
Also there's no buffer overflow as the description in CVE-2014-9456.
Fix#12669
Add new plugin notification NPPN_NATIVELANGCHANGED when the native language has been changed, and add new plugin message NPPM_GETNATIVELANGFILENAME for plugins calling after getting NPPN_NATIVELANGCHANGED notification.
Usage of the command:
#define NPPM_GETNATIVELANGFILENAME (NPPMSG + 116)
// int NPPM_GETNATIVELANGFILENAME(size_t strLen, char* nativeLangFileName)
// Get the Current native language file name string.
// Users should call it with nativeLangFileName as NULL to get the required number of char (not including the terminating nul character),
// allocate commandLineStr buffer with the return value + 1, then call it again to get the current native language file name string.
// wParam[in]: strLen is "commandLineStr" buffer length
// lParam[out]: commandLineStr recieves all copied native language file name string
// Return the number of char copied/to copy
Usage of the notification:
#define NPPN_NATIVELANGCHANGED (NPPN_FIRST + 31) // To notify plugins that the current native language is just changed to another one.
// Use NPPM_GETNATIVELANGFILENAME to get current native language file name.
// Use NPPM_GETMENUHANDLE(NPPPLUGINMENU, 0) to get submenu "Plugins" handle (HMENU)
//scnNotification->nmhdr.code = NPPN_NATIVELANGCHANGED;
//scnNotification->nmhdr.hwndFrom = hwndNpp
//scnNotification->nmhdr.idFrom = 0; // preserved for the future use, must be zero
Fix#15513, close#15582
Fix mismatched SCI_BEGINUNDOACTION:
When there is a SCI_BEGINUNDOACTION without the corresponding SCI_ENDUNDOACTION, it then causes that a single undo reverts many changes in at once.
Fix#9426, close#15577
Avoid linux issue:
../src/WinControls/DoubleBuffer/DoubleBuffer.cpp:18:10: fatal error: CommCtrl.h: No such file or directory
18 | #include <CommCtrl.h>
| ^~~~~~~~~~~~
Close#15566
Release 5.5.2 ( https://www.scintilla.org/scintilla552.zip )
Released 21 August 2024.
Add SCI_SETCOPYSEPARATOR for separator between parts of a multiple selection when copied to the clipboard. Feature #1530.
Add SCI_GETUNDOSEQUENCE to determine whether an undo sequence is active and its nesting depth.
Add SCI_STYLESETSTRETCH to support condensed and expanded text styles.
Add SCI_LINEINDENT and SCI_LINEDEDENT. Feature #1524.
Fix bug on Cocoa where double-click stopped working when system had been running for a long time.
On Cocoa implement more values of font weight and stretch.
Release 5.4.0 ( https://www.scintilla.org/lexilla540.zip )
Released 21 August 2024.
Inside Lexilla, LexerModule instances are now const. This will require changes to applications that modify Lexilla.cxx, which may be done to add custom lexers.
Lexer added for TOML "toml".
Bash: Handle backslash in heredoc delimiter. Issue #257.
Progress: Fix lexing of nested comments. Pull request #258.
Force lower-casing of case-insensitive keyword lists so keywords match in some lexers. Issue #259.
Close#15564
Improve Styler Configurator modification application performance considerably.
While one of dockable Panels (Folder as Workspace, for example) is loaded heavily, any action (checkboxes & comboboxes) on Styler Configurator reacts very slowly - for example, check "Bold" in "Font Style".
This commit makes difference among the operations, and optimizes each action in Styler Configurator.
Fix#12436, close#15560
When "User-defined keywords" field has been set keywords, removing all keywords then saving doesn't have any change (the keywords are kept after saving). The commit fix it.
Fix#15543, fix#14303
Add new SubStyles and their available keyword lists to specific languages:
- Enable 8 Scintilla's SubStyles (each), which allow for new keyword lists and styles for the languages with SubStyles available: ActionScript, ASP, Bash, C, C++, C#, GDScript, Go, HTML, Java, JavaScript (standalone and embedded), JSP, Lua, PHP, Python, Resource (RC), Swift, TypeScript, and XML.
- The new SubStyles have been added to `langs.model.xml`, `stylers.model.xml`, and the themes, which means users can just use the StyleConfigurator for the SubStyles, just like they do for the original Styles.
Fix#15520, close#15537
Release 5.5.1 ( https://www.scintilla.org/scintilla551.zip )
Released 22 July 2024.
SCI_CUTALLOWLINE added which is similar to SCI_COPYALLOWLINE but also deletes the copied text. Feature #1518.
Can set font used for autocompletion lists with SCI_AUTOCSETSTYLE. Feature #1523.
Increase maximum zoom set interactively to +60 points. Feature #1517.
Fix flickering cursor after some mouse action sequences. Bug #2443.
Release 5.3.3 ( https://www.scintilla.org/lexilla533.zip )
Released 22 July 2024.
ASP: Control whether ASP is enabled for XML and HTML with lexer.xml.allow.asp and lexer.html.allow.asp. Issue #252.
JavaScript: Recognize regular expressions at start or after '>' in JavaScript when lexer is cpp, hypertext, or xml. Issue #250, Bug #918.
JavaScript: Recognize initial #! 'shebang' line as a comment in standalone files. Issue #253.
Lua: Fix non-ASCII identifiers joined with '.' or ':'. Issue #242.
Lua: Fix folding for multi-line SCE_LUA_LITERALSTRING and SCE_LUA_COMMENT when performed incrementally. Issue #247.
PHP: Control whether PHP is enabled for XML and HTML with lexer.xml.allow.php and lexer.html.allow.php. Issue #252.
Close#15466
Syncronize Paste and Undo commands with file buffer read-only status.
Previously, after e.g. removing the read-only flag, file editing was possible immediately, but Ctrl-V was not. At least a cursor movement or switching between the N++ tabs or apps-switching was required (SCN_UPDATEUI message generated...).
Fix https://github.com/notepad-plus-plus/notepad-plus-plus/issues/13742#issuecomment-2233570312, close#15452
Now Notepad++ ensures that the Folder as Workspace treeview sorting will be ok even for the *nix (Samba, WebDAV, WSL..) storage used.
Fix#10557, fix#15397, close#15457
Add one more option for auto-indent so user can choose among "none", "basic" & "advance".
Also add the indentation section in Preferences dialog.
Fix#15396, close#15414
Essentially there are many deletions of capital letters in the middle of sentences (non-compliant in French)
Replacing the apostrophes ' with ' (alt+0146) (to make it prettier)
Replacement of "" (") by French quotation marks "" (alt+174 & alt175)(to make it prettier too)
Some formulations which were not very clear, or even incorrect.
Close#15355
Replace icon (findrep_off.ico) Dark Filled and Light Filled both had an additional 3 duplicate layers in the icon file.
Reported here: 53d87d4f62 (commitcomment-143611882)
Those duplicate layers have been removed.
Close#15373
The "ambiguous" symbols (TCHAR & generic_string) are used when Notepad++ suppoted both ANSI & Unicode formats.
Since ANSI format of Notepad++ has been dropped (since long time ago), TCHAR & generic_string will be replaced by wchar_t & wstring respectively.
Close#15371
- 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 aa3777786dbee09b22fa89e9d4b175cf438bc91d
Close#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
Sintilla [Release 5.4.3](https://www.scintilla.org/scintilla543.zip)
* Release 5.4.3: Released 9 March 2024
1. Fix redo failure introduced with 5.4.2. [Bug #2432](https://sourceforge.net/p/scintilla/bugs/2432/).
2. Add SC_AUTOCOMPLETE_SELECT_FIRST_ITEM option to always selects the first item in the autocompletion list. [Bug #2403](https://sourceforge.net/p/scintilla/bugs/2403/).
* Release 5.4.2: Released 5 March 2024
1. Significantly reduce memory used for undo actions, often to a half or quarter of previous versions. Feature #1458.
2. Add APIs for saving and restoring undo history.
3. For GTK, when laying out text, detect runs with both left-to-right and right-to-left ranges and divide into an ASCII prefix and more complex suffix. Lay out the ASCII prefix in the standard manner but, for the suffix, measure the whole width and spread that over the suffix bytes. This produces more usable results where the caret moves over the ASCII prefix correctly and over the suffix reasonably but not accurately.
4. For ScintillaEdit on Qt, fix reference from ScintillaDocument to Document to match change in 5.4.1 using IDocumentEditable for SCI_GETDOCPOINTER and SCI_SETDOCPOINTER.
5. For Direct2D on Win32, use the multi-threaded option to avoid crashes when Scintilla instances created on different threads. There may be more problems with this scenario so it should be avoided. Bug #2420.
6. For Win32, ensure keyboard-initiated context menu appears in multi-screen situations.
Lexilla [Release 5.3.1](https://www.scintilla.org/lexilla531.zip)
* Release 5.3.1: Released 5 March 2024
1. Assembler: After comments, treat \r\n line ends the same as \n. This makes testing easier.
2. Bash: Fix folding when line changed to/from comment and previous line is comment. Issue #224.
3. Batch: Fix handling ':' next to keywords. Issue #222.
4. JavaScript: in cpp lexer, add lexer.cpp.backquoted.strings=2 mode to treat ` back-quoted strings as template literals which allow embedded ${expressions}. Issue #94.
5. Python: fix lexing of rb'' and rf'' strings. Issue #223, Pull request #227.
6. Ruby: fix lexing of methods on numeric literals like '3.times' so the '.' and method name do not appear in numeric style. Issue #225.
Close#14834
https://www.scintilla.org/scintilla542.zip
Release 5.4.2
Released 5 March 2024.
Significantly reduce memory used for undo actions, often to a half or quarter of previous versions. Feature #1458.
Add APIs for saving and restoring undo history.
For GTK, when laying out text, detect runs with both left-to-right and right-to-left ranges and divide into an ASCII prefix and more complex suffix. Lay out the ASCII prefix in the standard manner but, for the suffix, measure the whole width and spread that over the suffix bytes. This produces more usable results where the caret moves over the ASCII prefix correctly and over the suffix reasonably but not accurately.
For ScintillaEdit on Qt, fix reference from ScintillaDocument to Document to match change in 5.4.1 using IDocumentEditable for SCI_GETDOCPOINTER and SCI_SETDOCPOINTER.
For Direct2D on Win32, use the multi-threaded option to avoid crashes when Scintilla instances created on different threads. There may be more problems with this scenario so it should be avoided. Bug #2420.
For Win32, ensure keyboard-initiated context menu appears in multi-screen situations.
https://www.scintilla.org/lexilla531.zip
Release 5.3.1
Released 5 March 2024.
Assembler: After comments, treat \r\n line ends the same as \n. This makes testing easier.
Bash: Fix folding when line changed to/from comment and previous line is comment. Issue #224.
Batch: Fix handling ':' next to keywords. Issue #222.
JavaScript: in cpp lexer, add lexer.cpp.backquoted.strings=2 mode to treat ` back-quoted strings as template literals which allow embedded ${expressions}. Issue #94.
Python: fix lexing of rb'' and rf'' strings. Issue #223, Pull request #227.
Ruby: fix lexing of methods on numeric literals like '3.times' so the '.' and method name do not appear in numeric style. Issue #225.
Add "ATTRIBUTE" color in Python.
Only DarkModeDefault.xml & Zenburn.xml are modified due to the other themes missing "DECORATOR" color with which "ATTRIBUTE" color uses.
I let people who use those themes and need "DECORATOR" & "ATTRIBUTE" colors to modify them.
Fix#5894, close#14830
1. Use appropriated localized title on some main save/open dialogs.
2. Reuse menu localized string and remove some redundent entries from localization files.
Fix#14737, fix#11860, close#14808
Fixes possible Notepad++ non-GUI state when minimized to systray with an unsaved file, closing from the systray icon & then cancelling that closing from the invoked Notepad++ save dialog.
Fix#14777, close#14778
When Notepad++ is minimized and there are 2 or more unsaved opened files,
close Notepad++ directly from the taskbar (no periodic backup) will launch modal Save All dialog,
which will not be on the foreground. Hence the blocage of Notepad++.
This commit fixes the issue above.
Fix#14718, close#14725
Add NPPN_GLOBALMODIFIED to notify plugins that the current document is just modified by Replace All action.
//scnNotification->nmhdr.code = NPPN_GLOBALMODIFIED;
//scnNotification->nmhdr.hwndFrom = BufferID;
//scnNotification->nmhdr.idFrom = 0; // preserved for the future use, must be zero
For solving the performance issue (from v8.6.4), Notepad++ doesn't trigger SCN_MODIFIED & other Scitilla notifications during Replace All action anymore.
Plugin devs should monitor NPPN_GLOBALMODIFIED instead. This notification is implemented in Notepad++ v8.6.5.
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14685#issuecomment-1955229867Fix#14767, close#14768
While saving a file needs the admin privilege, and if "Always In Multi-Instance Mode" option is activated, the current Notepad++ instance will be closed and a new instance with admin privilege contains no file is launched - it makes user confused because there are nothing to be edited and saved.
This commit fixes the issue by keeping the 1st instance opened, and launching the 2nd instance (with admin privilege) which contains the file in question - so user can modify it and save it.
The new behaviour (of this commit) not only fixes the issue, but also makes more sense, since it's "Always In Multi-Instance Mode". Note that the same behaviour happens if the session & periodical backup feature is disabled.
Fix#14694, close#14701
When recording a keyboard macro, some commands are added to the macro twice.
When later playing back the macro, they happen twice, which leads to incorrect edits.
Fixed commands:
* EDIT_CUT (Cut)
* EDIT_COPY (Copy)
* IDM_EDIT_LINE_UP (Move Up Current Line)
* IDM_EDIT_LINE_DOWN (Move Down Current Line)
Not fixed: issue 13722:
SEARCH_GOTOMATCHINGBRACE (Go to Matching Brace)
Fix#5217, fix#14634, close#14613
This commit allows Ctrl-V, Ctrl-C, Ctrl-X, Ctrl-A & Ctrl-Z in text field, so user can do paste, copy, cut, select all & redo/undo action respectively in Vertical Edge text field of Préférences dialog.
Also the paste content is controlled to allow only the number and white space.
Fix#13874, close#14586
This PR restores shortcuts Shift-DEL, Ctrl-INS and Shift-INS for Cut / Copy / Paste respectively.
the action to delete entire line without selection is removed in this PR due to its shortcut Shift-DEL has triggered several critical issues.
To delete entire line, the users are encouraged to use Scintilla default shortcuts set in Shortcut Mapper: Ctrl-Shift-L (SCI_LINEDELETE). User can remap it to another shortcut via Shortcut mapper.
Fix#14568, fix#14470, fix#14571, close#14557, close#14569
Add translation texts for these commits:
* Add new localization entries (d039eaa)
* Add navigation to the 1st & last tab abilities (4e6bbbc)
This also includes fix-ups to existing texts, to make it clearer.
Close#14534
Update translation texts for these commits:
* Fix confusing memory allocation error message (reused FileTooBigToOpen) (ffc0ed2)
* Make RTL per document & remembered across the sessions (2724e0d)
Close#14448
Scintilla 5.4.1
https://www.scintilla.org/scintilla541.zip
Released 27 December 2023.
1. Add IDocumentEditable interface to allow efficient interaction with document objects which may not be visible in a Scintilla instance. This feature is provisonal and may change before being declared stable. For better type-safety, the ScintillaCall C++ API uses IDocumentEditable* where void* was used before which may require changes to client code that uses document pointer APIs DocPointer, SetDocPointer, CreateDocument, AddRefDocument, and ReleaseDocument.
2. Ctrl-click on a selection deselects it in multiple selection mode.
3. Add SCI_SELECTIONFROMPOINT for modifying multiple selections.
4. Add SCI_SETMOVEEXTENDSSELECTION and SCI_CHANGESELECTIONMODE to simplify selection mode manipulation.
5. Improve performance of global replace by reducing cache invalidation overhead. [Feature #1502](https://sourceforge.net/p/scintilla/feature-requests/1502/).
6. Fix regular expression search for "\<" matching beginning of search when not beginning of word and for "\>" not matching line end. [Bug #2157](https://sourceforge.net/p/scintilla/bugs/2157/).
7. Fix regular expression search failure when search for "\<" followed by search for "\>". [Bug #2413](https://sourceforge.net/p/scintilla/bugs/2413/).
8. Fix regular expression assertion (^, $, \b. \B) failures when using SCFIND_CXX11REGEX. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/).
9. Fix regular expression bug in reverse direction where shortened match returned. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/).
10. Avoid character fragments in regular expression search results. [Bug #2405](https://sourceforge.net/p/scintilla/bugs/2405/).
11. With a document that does not have the SC_DOCUMENTOPTION_TEXT_LARGE option set, allocating more than 2G (calling SCI_ALLOCATE or similar) will now fail with SC_STATUS_FAILURE.
12. Protect SCI_REPLACETARGET, SCI_REPLACETARGETMINIMAL, and SCI_REPLACETARGETRE from application changing target in notification handlers. [Bug #2289](https://sourceforge.net/p/scintilla/bugs/2289/).
Lexilla 5.3.0
https://www.scintilla.org/lexilla530.zip
Released 27 December 2023.
1. Fix calling AddStaticLexerModule by defining as C++ instead of C which matches header. [Bug #2421](https://sourceforge.net/p/scintilla/bugs/2421/).
2. Bash: Fix shift operator << incorrectly recognized as here-doc. [Issue #215](https://github.com/ScintillaOrg/lexilla/issues/215).
3. Bash: Fix termination of '${' with first unquoted '}' instead of nesting. [Issue #216](https://github.com/ScintillaOrg/lexilla/issues/216).
4. HTML: JavaScript double-quoted strings may escape line end with '\'. [Issue #214](https://github.com/ScintillaOrg/lexilla/issues/214).
5. Lua: recognize --- doc comments. Defined by [LDoc](https://github.com/lunarmodules/ldoc). Does not recognize --[[-- doc comments which seem less common.
Close#14375
Fix some the results of "Find all in..." commands of long lines not being displayed, when the long lines are cut (its length > 2048).
All the results displayed in the cut long lines will be kept as the current behaviour. Additionally, each result beyond the cut long line (2048) will be displayed as default mode (ie. each entry will be displayed, so user can double click on the entry line for reaching the result).
Related: #12014Fix#12023, close#14520
By adding disableLineCopyCutDelete.xml in "%APPDATA%\Notepad++\" directory (or in the Notepad++ installed directory in portable mode) to:
1. prevent hard coded Shift-DEL shortcut deletes whole line while no selection.
2. prevent Copy command (Ctrl-C) copies whole line (without selection).
3. prevent Cut command (Ctrl-X) cuts whole line (without selection).
4. add SCI_CUT (Shift-DEL), SCI_COPY (Ctrl-INS) & SCI_PASTE (Shift-INS) shortcuts
Note: the old disableHardCodedShiftDelete.xml (of 53b5055118caa5934b535c5521f04f991c13143b) is canceled, the new disableLineCopyCutDelete.xml is used instead.
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14296#issuecomment-1866679990
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14401#issuecomment-1833326429Close#14513
Improves:
- the reported time accuracy (from seconds to milliseconds, now e.g. different N++ settings benchmarking is possible)
- the ability to analyze various problems (now it is possible to distinguish the time taken by the app/plugin code-init from the possible file loading time)
Fix#14472, close#14473
In order to disable the hard-coded shortcut "Shift-DEL" ability (new feature introduced in v8.6) which delete current line while no selection, users must add an empty file named "disableHardCodedShiftDelete.xml", in "%APPDATA%\Notepad++\" directory (or in the Notepad++ installed directory in portable mode) to prevent this behaviour.
Fix#14470, close#14481
The bug has been fixed in v8.5.7 by PR #14003.
However the fix causes a regression #14164, the concerning commit is reverted.
Hence this fix.
Fix#10266, fix#10365
This commit adds the ability of RTL/LTR per document (tab), and memorizes RTL setting of each file in the session.xml.
It also adds an attribute "editZoneRTL" in localization XML file. if "RTL" attribute is present and its value is "yes", then user can add "editZoneRTL" attribute beside, and set the value of the attribute in question to "no", so Notepad++ GUI will be RTL, but Scintilla zone will be LTR by opening files. Of course, user can set any direction they want afterward, and what they have set on document will be remembered across the sessions.
Fix#9665, fix#9950, fix#14385, close#14431
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: 4248c2ae22e07a030c9dd0684de1fd38125e9dfd
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
With searching in Google and trying to run several official unmodified verions of Notepad++ in virtual machines. Notepad++ come with several plugins enabled, which may stop working before Notepad++ version. Please attention that, the installed version of Internet Explorer may affect other software, which I did not test. The following is what I get.
For Windows 95, refer to these links:
http://www.win3x.org/win3board/viewtopic.php?t=17221https://notepad-plus-plus.narkive.com/6lktixGR/notepad-plus-help-notepad-v4-0-does-not-work-on-win95
I've confirmed that Notepad++ 3.9 runs on Windows 95 RTM/OSR 2.5, and Notepad++ 4.0.1 doesn't (4.0 not found, but I think there's only minor changes). So Notepad++ 3.9 is the latest version for Windows 95.
For Windows NT 4.0, nothing found when searching.
I've confirmed that Notepad++ 4.6 runs on Windows NT 4.0 SP6, and Notepad++ 4.7.1/4.7.2/4.7.3 runs with error of plugin, and Notepad++ 4.7.5 doesn't work. So Notpad++ 4.7.3 is the latest for Windows NT 4 with plugins disabled.
For Windows 98/ME, refer to these links:
http://web.archive.org/web/20110709191226/http://notepad-plus-plus.org/news/notepad-5.9.1-release-is-available.htmlhttps://msfn.org/board/topic/105936-last-versions-of-software-for-windows-98se/page/68/#comment-1176861
I've confirmed that Notepad++ 5.9.6.2 (ANSI) runs Windows 98 SE/ME, and Notepad++ 5.9.8/6.0 (ANSI) runs with error of plugin, and Notepad++ 6.1 doesn't work because no ANSI version available. So Notepad++ 6.0 (ANSI) is the latest for Windows 98/ME with plugins disabled.
For Windows 2000, I've confirmed that Notepad++ 6.5 runs on Windows 2000 SP4, and Notepad++ 6.6 with default plugins runs with error, and Notepad++ 6.7 doesn't work. So Notepad++ 6.6.9 is the latest for Windows 2000 with plugins disabled.
Close#13725
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 5b5c30b0d33f1aade36f7a270e60d52a1ff38613 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
Add translations for these commits:
* Add ability to do leading spaces with ColumnEditor (7f54a4b)
* Add more items and HTML Hexadecilmal column to ASCII panel (9b67c93)
* Add hits in-progress increased number to Search Progress dialog (508b3fa)
Close#13451
Update Japanese translation for these commits:
* Replace recent file ValueDlg with edit fields & fix DocSwitcher RTL problem (269e78b)
* Make tray icon context menu translatable (52d3c36)
* Add ability to copy "Find what" to "Replace with" and vice versa (12f649b)
Close#13339
Add built-in support for Microsoft's SQL dialect, Transact-SQL, used by Microsoft SQL Server. This enables Lexilla's dedicated MS SQL lexer.
To preserve the current file extension mapping, the new lexer is mapped to the *.tsql file extension only.
Users can select "Microsoft Transact-SQL" from the Language menu to apply MS SQL Server style to scripts with the *.sql extension.
Keywords and styles copied from https://www.scintilla.org/mssql.propertiesFix#5940, fix#7988, fix#11718, fix#12610, fix#13160, close#13184
https://www.scintilla.org/scintilla534.zip
Released 8 March 2023.
Add multithreaded wrap to significantly improve performance of wrapping large files.
More typesafe bindings of *Full APIs in ScintillaCall. Feature #1477.
Fix overlapping of text with line end wrap marker. Bug #2378.
Fix clipping of line end wrap symbol for SC_WRAPVISUALFLAGLOC_END_BY_TEXT.
Where a multi-byte character contains multiple styles, display each byte as a representation. This makes it easier to see and fix lexers that change styles mid-character, commonly because they use fixed size buffers.
Fix a potential crash with autocompletion list fill-ups where a SCN_CHARADDED handler retriggered an autocompletion list, but with no items that match the typed character.
lexilla523
Released 8 March 2023.
Add scripts/PromoteNew.bat script to promote .new files after checking.
Makefile: Remove 1024-byte line length limit..
Ruby: Add new lexical classes for % literals SCE_RB_STRING_W (%w non-interpolable string array), SCE_RB_STRING_I (%i non-interpolable symbol array), SCE_RB_STRING_QI (%I interpolable symbol array), and SCE_RB_STRING_QS (%s symbol). Issue #124.
Ruby: Disambiguate %= which may be a quote or modulo assignment. Issue #124, Bug #1255, Bug #2182.
Ruby: Fix additional fold level for single character in SCE_RB_STRING_QW. Issue #132.
Ruby: Set SCE_RB_HERE_QQ for unquoted and double-quoted heredocs and SCE_RB_HERE_QX for backticks-quoted heredocs. Issue #134.
Ruby: Recognise #{} inside SCE_RB_HERE_QQ and SCE_RB_HERE_QX. Issue #134.
Ruby: Improve regex and heredoc recognition. Issue #136.
Ruby: Highlight #@, #@@ and #$ style interpolation. Issue #140.
Ruby: Fix folding for multiple heredocs started on one line. Fix folding when there is a space after heredoc opening delimiter. Issue #135.
YAML: Remove 1024-byte line length limit.
https://www.scintilla.org/lexilla524.zip
Released 13 March 2023.
C++: Fix failure to recognize keywords containing upper case. Issue #149.
GDScript: Support % and $ node paths. Issue #145, Pull request #146.
Close#13338
This feature use the same swap button for new added actions:
Use mouse right click on swap button to have popup menu for toggling among "Swap Replace with Find", "Copy from Find to Replace" and "Copy from Replace to Find".
Related to #12195Fix#12122, close#13332
Close#13262
* update translation to current workprint of english.xml
* change version scheme to a yyyy.mm.dd format for better versioning
* removed redundant comments
Add translations for these commits:
* Add Begin/End Select in Column Mode command (0792452)
* Add show non-printable characters command (aaab190)
* Make Non-Print Characters show by default (dc99ce1)
* Translate 'Compact Language Menu' popup dialog (43d9f0d)
* Add option to make auto-completion list brief (9eab1f5)
* Make two items in progress dialog translatable (3f13957)
* Make categories in the Shortcut Mapper dialog translatable (f7fcab4)
* Make theme warning message translatable (switching unsaved theme to another) (0c704fd)
* Apply tab colors to document list items and add groups to document list. (37963ea)
* Make Context menu in Shortcut Mapper (Modify, Delete, Clear) translatable (f403b12)
* Fix translation issue for Dock/Undock label in User-Defined dialog (9627494)
* GUI enhancement: replace auto-complete link mini dlg with slider (caff51c)
* Rename commanfd "Remove Unmarked Lines" to "Remove Non-Bookmarked Lines" (3f3aed4)
* Make "Cannot open file" message translatable (a689635)
* GUI enhancement: use edit field instead of tab size link + mini dlg (8b3f072)
* Set english.xml version right (99e7c5a)
Close#13093
Close#13161
Estuve más de cuatro horas para adaptarlo al english.xml actual y son necesarios más cambios.
Espero que lo acepten para terminar de igualarlo en futuras traducciones.
Windows 11 has its new interface for its explorer context menu. It makes the old "Edit with Notepad++" command hardly accessible. This commit improves the accessibility and also fix issue of run as an administrator (Properties set in Compatibility) in the new context menu command.
It fixes also the context menu command issue under ARM64 architecture (fixed only under Windows 11).
The localization of "Edit with Notepad++" is also possible in this commit.
Note that if the command place of "Edit with Notepad++" context menu command is taken by other application ("\HKEY_CLASSES_ROOT*\shell\pintohome"), the new context menu "Edit with Notepad++" won't be installed. User should install it him/herself.
Fix#10320, fix#10565, fix#4368, fix#8786, fix#10320, fix#10640, fix#10856, fix#10653, fix#7747, fix#6169, fix#92, close#13170
- fix ignored-qualifiers warnings
- fix inconsistent-missing-override warnings
- use -O3 flag for GCC builds to keep inline with scintilla and lexilla
- add clang default settings in props
- add clang detection in debug info
Fix#13099, close#13100
update to https://www.scintilla.org/scintilla533.zip with:
1. Released 8 February 2023.
2. Fix SCI_LINESJOIN bug where carriage returns were incorrectly retained. Bug #2372.
3. Fix SCI_VERTICALCENTRECARET to update the vertical scroll position.
4. When an autocompletion list is shown in response to SCN_CHARADDED, do not process character as fill-up or stop. This avoids closing immediately when a character may both trigger and finish autocompletion.
5. On Cocoa fix character input bug where dotless 'i' and some other extended Latin characters could not be entered. The change also stops SCI_ASSIGNCMDKEY from working with these characters on Cocoa. Bug #2374.
6. On GTK, support IME context. Feature #1476.
7. On GTK on Win32, fix scrolling speed to not be too fast. Bug #2375.
8. On Qt, fix indicator drawing past left of text pane over margin. Bug #2373, Bug #1956.
9. On Qt, allow scrolling with mouse wheel when scroll bar hidden.
and https://www.scintilla.org/lexilla522.zip with
1. Released 8 February 2023.
2. C++: Fix keywords that start with non-ASCII. Also affects other lexers. Issue #130.
3. Matlab: Include more prefix and suffix characters in numeric literals. Issue #120.
4. Matlab: More accurate treatment of line ends inside strings. Matlab and Octave are different here. Issue #18.
5. Modula-3: Don't treat identifier suffix that matches keyword as keyword. Issue #129.
6. Modula-3: Fix endless loop in folder. Issue #128.
7. Modula-3: Fix access to lines beyond document end in folder. Issue #131.
8. Python: Don't highlight match and case as keywords in contexts where they probably aren't used as keywords. Pull request #122.
9. X12: Support empty envelopes. Bug #2369.
update CMakeLists.txt to latest changes within vcxproj file
Close#13082
In 94b83158dcd00d7e705d87aa95f16f8773cc70c0, closing doc in document list was on middle mouse button down.
This commit make it on middle mouse button up (for aligning with closing tab behaviour in Notepad++, also with OS middle mouse button click behaviour).
Word autocomplete change from case sensitive search to variable search based on _ignoreCase unless language type is text. This allows text documents to retain case sensitive search to respect typed case as the issue only affects case insensitive Data/Programming languages. If normal.xml exist in the autocomplete folder then xml defaults apply for text so would be case insensitive by default unless overridden by the xml setting <Environment ignoreCase="no" />.
Fix#13060, close#13062
Add translations for these commits:
* Add support selection for "EOL to Space" commands (81a77f13a6446cd4e87d34884b5427d2e0595844)
* Add setting for panels to ignore '-nosession' (307fd2fcd2d4dd7a626092e6e1dc1a0467b596f5)
Close#12750
Currently, it's only JSONC (with js comment supported).
It will be enhanced in the future.
Usage: set your file to JSON5 via language menu, or change file extension to .json5 or .jsonc.
Note that the keywords and stylers are shared with JSON.
Fix#11676, fix#11713, close#12761
Prevent in function list panel entries of procedure/function declarations placed in interface section of a Pascal unit as they are superfluous duplicates.
Fix#12693, fix#12687, close#12686, close#12694
1. Fix custom theme (in %APPDATA%) not changing if it is not in default theme dir (in the installation location).
2. Fix default dark theme not applied in dark mode if config is missing (For example, the 1st launch of Notepad++ after its installation).
3. Fix theme not working in cloud issue and portable mode.
Fix#6092, fix#10801, fix#12296, close#12662
Add translations for these commits:
* Add localization for Length label in the Customize Maximum Length popup (bc1487881ab15f3d5e5bc6c3fb06ff8168b5fdea)
* Update localization files (11ccc415e71cdd3674dac2595479302452965121)
* Fix localization files (3fcad98883bd719b6be63f234648f5712018548f)
* Fix inconsistencies at OS-forced Notepad++ (v8.4.7) exit (bd4c323d75bbe9a565e9bc31bb522133d78421a6)
* Make tab context menu customizable (aa8ae48b9946d0a26b1e51564246bb1dc981a827)
Close#12542
Also some fix to remove useless space characters.
update to https://www.scintilla.org/scintilla532.zip with:
Released 6 December 2022.
Add SCI_REPLACETARGETMINIMAL to change text without causing unchanged prefix and suffix to be marked as modified in change history.
Draw background colour for EOL annotations with standard and boxed visuals.
Add SCI_GETSTYLEDTEXTFULL to support 64-bit document positions on Win32 replacing SCI_GETSTYLEDTEXT which is not safe for huge documents. Feature #1455.
Send SCN_AUTOCCOMPLETED for SCI_AUTOCSHOW triggering insertion because of SCI_AUTOCSETCHOOSESINGLE mode. Feature #1459.
Change 'paragraph up' commands SCI_PARAUP and SCI_PARAUPEXTEND to go to the start position of the paragraph containing the caret. Only if the caret is already at the start of the paragraph will it go to the start of the previous paragraph. Bug #2363.
Change release compilation optimization option to favour speed over space. -O2 for MSVC and -O3 for gcc and clang.
On Win32, avoid blurry display with DirectWrite in GDI scaling mode. Bug #2344.
On Win32, use the top-level window to find the monitor for DirectWrite rendering parameters. Temporarily switch DPI awareness to find correct monitor in GDI scaling mode. Bug #2344.
On Qt, implement SCI_SETRECTANGULARSELECTIONMODIFIER for all platforms.
On Qt, allow string form XPM images for SCI_REGISTERIMAGE.
and https://www.scintilla.org/lexilla521.zip with
Released 6 December 2022.
Update to Unicode 14. Feature #1461.
Change default compilation optimization option to favour speed over space. -O2 for MSVC and -O3 for gcc and clang.
Batch: Fix comments starting inside strings. Issue #115.
F#: Lex signed numeric literals more accurately. Issue #110, Issue #111.
F#: Add specifiers for 64-bit integer and floating point literals. Issue #112.
Markdown: Stop styling numbers at line start in PRECHAR style. Issue #117.
PowerShell: Recognise numeric literals more accurately. Issue #118.
Close#12624
Implement support for Win32 Namespace prefixed file name in Notepad++.
(Ref: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#win32-file-namespaces)
Support the Win32-filenames escaped by \\?\ or \\?\UNC\, possible globbing in filenames (\\?\C:\fil?.txt) and shell links (\\?\C:\file.txt.lnk) included.
Unsupported (temporarily - it needs further patches for Notepad++):
- any raw filename with length exceeding the MAX_PATH.
- any nonstandard Windows OS filename: with 'dot' or 'space' char(s) at the name end, WinOS reserved ones: AUX, CON, PRN, NUL, COM1-9, LPT1-9 and the ones with invalid ASCII chars in it (0-31, <, >, | , ").
Fix#12453, close#12613
This commit uses the same mechanism (8e85110b5eba0e7af2ccc3536ec943b6ed3bf446) for organization of macro menu:
Add attribute `FolderName="sub-menu name"` in "Command" node to have the sub-menu.
Close#12617
This fixes users reported inconsistency in between the usual Notepad++ exit initiated manually by a user and the Windows OS forced one in case that the Notepad++ backup mode is ON.
Fix 2nd part of the #12541Close#12600
Use tabContextMenu_example.xml for the customization:
1. rename to tabContextMenu.xml
2. modify it
3. copy it beside notepad++.exe or to %APPDATA%\Notepad++\ according to your Notepad++ conf
4. relaunch Notepad++
Note for the localization:
1. You have to use the newest localization file (or modify your existing localization file with the newest english.xml).
2. The customized sub-menu entry cannot be translated. User can use his/her native language as value of attribute "FolderName" in tabContextMenu.xml file.
3. User can always add any command beyond the default commands in tabContextMenu.xml file. But such command won't be translated.
Fix#12170, close#12576
Now if the Notepad++ will have an unsaved data and is still running at the OS restart/shutdown, there will be one universal messagebox "Windows session is about to be terminated but you have some data unsaved. Do you want to exit Notepad++ now?".
When Notepad++ backup mode is ON, answer:
- YES ... Notepad++ simply quits (Notepad++ backup engine silently handles all the stuff needed)
- NO ... Notepad++ stays running, user is on his/her own
When Notepad++ backup mode is OFF, answer:
- YES ... Notepad++ behaves identically as in the case of the usual Notepad++ IDM_FILE_EXIT or WM_CLOSE messages (save dlgs appears etc., it depends on the current user Notepad++ settings)
- NO ... Notepad++ stays running, user is on his/her own
Fix v847
1. Add "Follow Windows dark/light mode".
2. Remember user's toolbar, tabbar and theme choices for dark mode and light mode separately.
3. Add 2 hidden options for applying tab background color from themes (for both dark mode and light mode).
Fix#9183, fix#9992, fix#10153, fix#10239, fix#10544, fix#10644, fix#11867, fix#10239, close#12466
This fixes both the long standing problem with the emptying of the session.xml file by forced Windows Update restart/shutdown and some potential Notepad++ crashes caused by possible main Notepad++ window blocking at exit.
Two main changes to the original design:
- WM_QUERYENDSESSION is not used anymore for the tidy-up ops and it always quickly returns TRUE/FALSE to the system as it should.
- there is now a safe-guard flag for the session.xml saving at N++ exit, which prevents otherwise possible incorrect overwriting in case of multiple "endsession" messages.
Fix#9850, fix#12389, close#12388
Add translations for these commits:
* Make large file limit (for styling) configurable (8ff003412acc9b55413040b27110bf7ef887300b)
* Add tooltips in performance section to make features more explicit (c02c23b7d431fe27ebad41619df4c2b4f1ea3a9a)
* Enhance Large File Restriction UI (6755daf223299ffcd49a8b6ca233c79627578f05)
* Add "Allow clickable link" option in large file restriction (cd6a6ac3bb4d46a9ddd53e3bde2002db00ac00f5)
Close#12361
1. Rename some labels to be more explicit.
2. Add a tooltip for "Deactivate Word Wrap globally".
3. Unchecking "Enable Large File Restriction" removes the sub-restrictions.
Background: because styling large file can cause the performance issue, 200 MB (and bigger) file is not applied to its language (if any) while loading.
This PR makes large file restriction for styling and for other features (smart highlighting, brace match, etc...) configurable via the section Performance of Preferences dialog.
Fix#11389, fix#12260, fix#11670, close#12310
Properly handle missing file extensions in `Buffer::setFileName`
Before 6263ce5, the user-preferred default language would apply to
files with no extension, but got overwritten by `L_TEXT` when the
extension was present *but unknown*.
This is why the `buf->_lang == L_TEXT` condition failed *only for
buffers with _no_ extension*.
Fix#11504, close#12286
Close#12162
Add/Update translations for these commits:
* Unify the terms "Fold/unfold" on menu (15e5da6f7d0c5ef7563e1127c84f3778c75607e7)
* Add setting colour ability for individual tab (42d863dd9f46768edee3013bfd232a27597f8ef9)
* Change to menu name to the "normalized" terms on Internet (aad36afc6bf4177ed6532086acf5f393de1f1b8f)
* Revamp tab context menu (6322562cf82873d1403a0a297d114c3d7304b30e)
* Complete localization files with missing entries (4cb63ff011064dfee1a1b5a25e47311fa726f33b)
* Add Change History markers for saved/unsaved/undone modification (fc32fbdcce371bb669c9361d62c959b1b61e33f0)
The plugins which are not compatible but their newer versions are available are not only on the incompatible list, but also on the Updates list.
Fix#12069, close#12105
Commits: 7d5516e0a8ef69d04165926255828cc70c0c3811 851900334cc9699818230ad686ead79a3ecc79c0 9809e2fc2cb9aa2ace06a7cdd5b89b49e27e8927
Other minor corrections
Close#12068
Add translations for these commits:
* Add an option for hiding the + ▼ ✕ from the menu bar (7d5516e0a8ef69d04165926255828cc70c0c3811)
* Add cycling function hints ability by ALT-UP/DOWN shortcuts (851900334cc9699818230ad686ead79a3ecc79c0)
* Add option to turn off selecting text when Field dialog is invoked (9809e2fc2cb9aa2ace06a7cdd5b89b49e27e8927)
Close#11967
Fix detected language not being applied if Default languge is set in Document settings.
Don't override detected file type with default language:
When loading files with no extension from disk, remove the extra condition so the default language setting does not take precedence over the auto-detected file type (if any)
Fix#11504, close#11992
Fixes uninitialized CmdLineParamsDTO parameters:
uninitialized _udlName could cause crash when drag&drop files between different Notepad++ instances.
Fix#11976, close#11977
Deletion of one line where there's folding didn't show the hiden lines in the old version of Scitilla.
It's not anymore the case in the new (current used) version of Scintilla (which manages such situation correctly).
Therefore the redundant notification for the current used version of Scintilla can be removed, and it solves hanging problem.
Fix#10193, close#11946
When document contains a very long line and the wrapped feature is ON, switch off then switch back to this document could take times.
This commit reduce the delay largely while switching into the document with very long line.
Fix#11942
Add translation for this commit:
* Add some shortcuts in Styler Configurator to preferences dialog (67ab4d55276ae99e632f19d1035de70cc022e3b9)
Close#11917
Fix CJK, Hebrew, Arabic and other Languages in UTF8 marked wronly issue in in Search result while "1 entry per line" option enabled.
The option in question can be enabled in RTL mode now with this commit.
Add translations for these commits:
* Use edge colors in dark mode for listbox border (d65967deabaff17069e789019e060c9a87f5f076)
* Make EOL (CRLF) display customizable (79e766755d9d466704c535f99eb3ce99ffbbb1bf)
* Update localization files (2258274780ce18be0406183bf7b9619202c3c06e)
Close#11775
Add translation for item 6246 (current level folding/unfolding).
Add/update translations for dark mode items.
Synchronise translation of "commands" to "Befehle" to have same word in all places.
Close#11738
Better specify the cmdline interpreter:
This solves a possible confusion in between the cmdline interpreter and the possible folder named "cmd"' for the ShellExecute WINAPI.
Fix#11818, close#11833
Also mark several found occurrences in the same entry - user can click on the marked occurrence to jump among found result in the found line.
This option is enabled by default. It can be disabled in "Searching" section of Preferences dialog.
It's an alternative implementation of #11705Fix#2481, fix#1499, fix#5547, fix#2987, fix#4525, fix#3224, close#11808
It's due to the folding the previous result before the begin of search.
For the unknown reason there's performance issue if folding action is at this place for Scintilla 5.
Fix#11814
Here is the behaviour of this commit:
1. If there's only one file dirty, and it's current editing one, then SaveAll dialog won't display.
2. If there's only one file dirty, and it's NOT current editing one, then SaveAll dialog WILL display.
3. If there's 1 editing file which is dirty, and its clone (dirty also) is on the other view, then SaveAll dialog WILL display.
Fix#10995
1. use edge colors in darkmode for edit control border.
2. tweaks to properly drawn listbox scrollbar, when using custom border.
3. disabled edge color to dark mode preference dialog.
4. use disabled edge color for disabled combobox.
Fix#11207, fix#11376, close#11756
1. Add plus and arrow buttons on menu bar beside of 'X' button:
- plus button: for adding a new document
- arrow button: display a drop down list for all opened files to offer users quick access of switching file
2. Enhance the most recent opened file list: Increase maximun file number to 30.
Fix#11229, close#11757
* Fix certificate checking problem: the old certificate has been expired. In v8.4.2 Notepad++ & its components are signed by the new certificate. The certificate is checked before launching WinGUp (updater) to compare with the certificate key value stored in Notepad++. Updating certificate key value fixes the problem of WinUp validation, so Plugin Admin can be shown on the menu.
* Fix a typo.
Fix#11742
Add translations for these commit:
* Add edge highlight color in customized dark colors of Preferences dialog (ad8b1791b4c761bbdcd098260f25cf122535e768)
* Update localization files (e8817eacd01b163f97efa89ef2bc2ba5b271010c)
Close#11686
Query for DisplayVersion as well instead of using only ReleaseId.
Windows deprecated the ReleaseID registry entry (now it is no longer updated and on newer Windows 10/11 builds will remain the same) and moved to use DisplayVersion.
Attempt now to first query DisplayVersion and in case that is missing, fall back to ReleaseID for older Windows 10 builds.
Close#11714
This is the enhancement of a long time forgotten feature.
To override the current toolbar icons, we needs 2 things: "toolbarIcons.xml" file and one icons set.
Here are the instructions to customize toolbar icons:
1. Put the file "toolbarIcons.xml" (Note 1) in the same folder of "config.xml" file (Note 2).
2. Create a new folder "toolbarIcons" in the folder where you put "toolbarIcons.xml" file.
3. Edit the file "toolbarIcons.xml": put the icon set name you want in "icoFolderName" attribute (Note 3).
for example: `<ToolBarIcons icoFolderName="myAwesomeIcons" />`
4. Go into "toolbarIcons" folder and create a new folder with the exact name of the icon set name you provided in "icoFolderName".
5. Put all your customized icons into "[toolbarIcons.xml's folder]\toolbarIcons\myAwesomeIcons\".
6. Now it's the magic moment: Relaunch Notepad++ and you'll see your icon set instead of the default icons.
Note:
1. The content of "toolbarIcons.xml" is following:
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<ToolBarIcons icoFolderName="nppLagacyIcons" />
</NotepadPlus>
```
2. If you find the file "doLocalConf.xml" in the Notepad++ installed directory, you will find the "config.xml" in Notepad++ installed directory. Otherwise it should be in "%APPDATA%\Notepad++\" directory.
3. if "icoFolderName" value is an emptty string, the path of icons will be in "[toolbarIcons.xml's folder]\toolbarIcons\default\" folder.
Each replacing icon (45 icons) has the fixed and specific name:
| index | Normal icon | Disabled icon |
|-------|--------------------------|---------------------------------|
|1 | new.ico | |
|2 | open.ico | |
|3 | save.ico | save_disabled.ico |
|4 | save-all.ico | save-all_disabled.ico |
|5 | close.ico | |
|6 | close-all.ico | |
|7 | print.ico | |
|8 | cut.ico | cut_disabled.ico |
|9 | copy.ico | copy_disabled.ico |
|10 | paste.ico | paste_disabled.ico |
|11 | undo.ico | undo_disabled.ico |
|12 | redo.ico | redo_disabled.ico |
|13 | find.ico | |
|14 | replace.ico | |
|15 | zoom-in.ico | |
|16 | zoom-out.ico | |
|17 | sync-vertical.ico | |
|18 | sync-horizontal.ico | |
|19 | word-wrap.ico | |
|20 | all-chars.ico | |
|21 | indent-guide.ico | |
|22 | udl-dlg.ico | |
|23 | doc-map.ico | |
|24 | doc-list.ico | |
|25 | function-list.ico | |
|26 | folder-as-workspace.ico | |
|27 | monitoring.ico | monitoring_disabled.ico |
|28 | record.ico | record_disabled.ico |
|29 | stop-record.ico | stop-record_disabled.ico |
|30 | playback.ico | playback_disabled.ico |
|31 | playback-multiple.ico | playback-multiple_disabled.ico |
|32 | save-macro.ico | save-macro_disabled.ico |
It's not necessary to have all complete set (45 icons). The absent icons won't just be substituted.
Fix#9913
Add an option "Make current line folding/unfolding commands togglable" in Editing section of Preference dialog to make both Collapse/Uncollapse Current level commands togglable.
Fix#11529, fix#9196, close 11699
Select the entire DebugInfo text, with the command line params inserted.
This is a minor fix for an issue resulting from the last-minute changes in commit 0f8d572 (Add command line argument for plugin, a related notification and an API).
Close#11697
Fix also an issue that the word where the cursor is on in the edit zone is selected after running ABOUT box, that makes all the occurence of same word highlighted in the edit zone.
Fix#11639, fix 11671, close#11673
Fix crashes when re-invoked with -udl command line parameter with more than 7 characters as its value:
Serialize _udlName from generic_string to wchar_t _udlName[MAX_PATH].
Fix#11633, close#11681
1. Add a cmd argument for plugin: -pluginMessage="SPECIFIC_PLUGIN_MESSQGE" where SPECIFIC_PLUGIN_MESSQGE is a string which can contain white space. For example: -pluginMessage="arg1 arg2 arg3".
2. NPPN_CMDLINEPLUGINMSG notification: which will be triggered by -pluginMessage and plugins will get their specific message "arg1 arg2 arg3" via idFrom field:
//scnNotification->nmhdr.code = NPPN_CMDLINEPLUGINMSG;
//scnNotification->nmhdr.hwndFrom = hwndNpp;
//scnNotification->nmhdr.idFrom = pluginMessage; //where pluginMessage is pointer of type wchar_t
3. Add NPPM_GETCURRENTCMDLINE API for getting the latest command line.
4. Update command line dynamically in Debug info dialog.
Fix#11576, close#11589
Changes:
1) Removal of redundant lines (redundancy as defined by absence from the English version, I have not gone on to check the code for where each term is used, refer to Issue https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11561#issue-1210847469)
2) Addition of lines which are found in the English version but were absent in the Tamil
3) Spelling error rectifications (eg: "கீல்" is an erroneous form of கீழ்)
4) Retention of English words for certain terms best left untranslated (eg: Macro; பெருநிரல் _does_ convey the literal meaning, but would be extremely confusing, as such usage is specialized and not directly connected to the literal meaning. Macro here performs much like a proper noun, an untranslatable, and I opine that translating that would be quite similar to translating Notepad++, Windows etc. In other cases, perceived rarity of the term's usage, potential confusion, and lack of sufficient systematicity in the usage of programming terms in Tamil have also been reasons)
5) Rewording certain terms as they seem of a fringe usage, and replacing them with commoner alternatives (eg: படி எடு for Copy has been replaced by நகலெடு, whose use is fairly universal nowadays, in OSs, apps, websites, etc. which display in Tamil. It must be noted that the previous version seems to be nearly ten years old, and probably the usage was more fluid and non-standard back then.)
6) Removal of lines that are plainly copied out from the English version untranslated, and cannot be translated
7) Addition of &/alt codes (I'm not sure exactly what they're called) as in English
Unresolved Problem Points:
1) The alt codes have been presented to a user using the Latin/English keyboard. (eg: for "&File", "கோப்பு (&F)" has been provided instead of the equally viable "&கோப்பு") This, although in keeping with the previous version, may present Tamil users an inconsistent display, what with the numerous bracketed and seemingly random English letters beside Tamil text, and inconvenience users of Tamil keyboard(s).
The example of other Indian languages may be used to argue for "&கோப்பு", while the example of Chinese, Japanese and Korean may be used to argue otherwise (it must be noted, though, that Tamil and Indian languages have their own keyboards as well as phonetic typing from English, whereas Chinese et.al. are typed, as far as I am aware, solely using the phonetic English method, and therefore the first argument may not stand)
To be very honest, I almost set out removing all the old bracketed-English-letter style stuff and creating them based off Tamil letters, but chickened out seeing the utter scale. I also am not sure how this would be welcomed by users, since they may now be quite habituated to using the English letters, and tampering with the functionality of the application (to a tiny extent, admittedly) is _not_ what I thought I was taking into my hands when I started doing this
2) Most of the popup messages have been left untranslated, coming to more than hundred lines (I'm sorry, I'm not doing any more now, maybe later, or hopefully someone else who uses N++ in Tamil/knows Tamil can step up and help; I'm sure my version of even those parts that I _have_ edited is not up to snuff either)
3) There are some technical vocabulary issues. For instance, there is a general confusion between அழி, நீக்கு and அகற்று for delete and remove. I have chosen அகற்று for remove, and kept the other two both for delete, due to how often both were used. But I think there could be a better solution, and a more systematic one. This is also, incidentally, just the tip of the iceberg.
4) I was also unsure about where to draw the line between translating an English word to Tamil and retaining the English word. In several cases, I used my familiarity with the words in a technical context to make such a decision. Since I also relied quite a bit on online dictionaries, and cross checked them across websites to be sure, I cannot vouch for all of them, and probably quite a few have been excessively Tamilised, or retained in English even when a patently viable and common alternative exists. I hope some others can account for those
Close#11579
Preferences Dialog - MultiInstance UI:
1. Increased the height of the 1st groupbox by 3 units.
2. Shifted the controls inside it by 4 units.
3. Reduced the height of the 2nd groupbox by 3 units.
4. Shifted the groupbox top and the checkbox only down by 3 units.
Style Configurator Dialog:
5. Added 'BS_CENTER' modifier to "Font Style" & "Colour Style" groupboxes.
Fix#11590, close#11591
In Scintilla4 reloaded document keeps its syntax highlighting without re-applying the lexer for its syntax highlighting.
It seems the behaviour has been changed in Scintilla5. Hence this workaround to force to apply syntax highlighting after reloading.
Fix#11606, close#11610
Add APIs: 2 new messages NPPM_ISDARKMODEENABLED & NPPM_GETDARKMODECOLORS, and 1 new notification NPPN_DARKMODECHANGED.
Fixed also a bug in dark mode for PushLike CheckBoxes.
Fix#11546, close#11547
Add translations for these commits:
* Add default sorting ability in Function list (64bfa72bd0693344b81017cece1f52a28511e42a)
* Add virtual space ability (88ed851478b3426e9cca365b67a1ceb4cd4f92e2)
Close#11512
Fix case-conversion code to handle changing string lengths:
Fixes an issue where, e.g., upper-casing U+2C65 adds garbage to the
document because its capital form U+023A has a shorter UTF-8 encoding.
Incidentally fixes another bug: rows would be truncated at the first
NUL when changing case in column mode.
Fix#11463, close#11464
This is a regression of upgrading Scintilla from 4.x to 5.x due to concerning Scintilla APIs having changed their behaviour.
This PR follows the new instructions of Scintilla documentation to make it work again.
Fix#11433, close#11433
- Edit control in Date Time for Custom format
- Tooltip in Delimiter for Word character list
- Fix blurry text in Link for Clickable Link Settings
Fix#11497, close#11498
For the sake of maintenance of Scintilla (future update), we try to not modify Scintilla project, or at least minimize its modification.
Hence the compiling boost part is shifted to Notepad++ project.
Fix#11014, close#11485
Scrolling "Document List" to make the selected item visible after:
- selecting
- opening a file or files
- the program startup
- adding/removing columns
This commit doesn't cover the case of the selected item becoming invisible after resizing of the window.
Fix#11204, close#11471
* Add new preference setting to allow function list to be sorted lexicographically by default.
* Fix sorting for mixed mode function list parsers on new file open.
* Add new translations to english.xml and german.xml.
Fix#11446, close#11447
1. Scintilla and Lexilla intermediate files are created in the same folder as NPP build file (`bin.i686.build` or `bin.x86_64.build`), but in subfolder `_lexilla.build` and `_scintilla.build`. I added `_` char at the beginning so these folders are always at the beginning. If you prefer a different name or location it can be change.
2. Stop build and dispaly error message when someone run "outside build" (use `-f` option) and source path has any spaces. It won't work anyway, so it's worth stopping the process and give a clear message.
3. Add new phony target `sciclean` and `lexclean` for deleting Scintilla or Lexilla intermediate files separately.
4. Change `_` to `|` for temporary replacement of space characters when detect proper shell. Char `_` is allowed in paths and should not be used for that purpose.
5. Add one more condition for `MAKELEVEL` variable to prevent unnecessary second calls to Scintilla and Lexilla makefile.
6. Update also `nppSpecifics_mingw.mak` file to works with above change.
Now we don't have to remember to clean up the previous files when we switch to different compiler (32-bit or 64-bit) or when we generate a debug version.
Fix 10991, close#11450
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-papyrusClose#11468
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 (1c8b8673958f1872e80f279f85aeb83771c9789e)
* Add "Windows..." localization entry (ee765135be97808d68d04700a349abb9ac0ad41d)
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
* * According to d9ef4be, 9be4eeb, 78c6554, 68d339d, e048f83, 85e7207 and 2c1090e commits.
* I don't know how i missed the removal of id=42079, but removed now (line 178).
Close#11183
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
If user tries to save a existing file as file itself by using "Save As" command,
then he/she chooses the same file from the Save As file dialog,
* old wrong behaviour: "Save As" action is rejected with the message "The file is already opened in Notepad++".
* new correct behaviour: "Save As" action is allowed.
Fix#10965, close#11008
1. Add new commands to copy selected files name/path into multi-selection context menu in Document List.
2. Add new commands to copy all files name/path into Edit > Copy to Clipboard.
3. Create a new function buf2Clipborad() to be used in all similar commands.
4. Fix the translation of the Document List multi-selection context menu.
Fix#10394, close#10993
Translation update to follow this commit:
* Add auto save loaded session on exit feature (a16930fffea1d69034d0f4336ff71b81f239dd9f)
Also, fix for looking of parentheses for inconsistency.
Fix#10949
Rename current tab & Rename User Language name could be up to 63 characters now!
(Before this implementation the limit size is about 20 characters)
Fix#10961, fix#9849, close
1. Document List icons now support darkmode icons and alternate icons.
2. Fixed memory leak in code and additional code refactoring.
Fix#10740, close#10956
This PR allows users to provide the list of excluding folder names/patterns in "Filters" field.
Eclusion operator is alway "!" at the begining. In order to distinguish folder from file, "\" should be used as prefix of the folder name/pattern, following "!". That allows the exclusion of the directories under the root directory you want to search (the 1st level of matched directories).
If users need to exclude folders with the same name (or names matched the specific pattern) in all levels, the + should be put between "!" and "\" to exclude them recursively.
Here is a sample:
Filters: *.* !\bin !+\test !+\log*
Directory: c:\myProject\
So the excluded directories could be:
c:\myProject\bin\
c:\myProject\log\
c:\myProject\logs\
c:\myProject\src\log4j\
c:\myProject\test\
c:\myProject\src\test\
The following directories will not be excluded:
c:\myProject\foo\tests\
c:\myProject\foo\bin\
Note that "inclusion of folder" is not allowed, and such pattern will be ignored.
Fix#2433, fix#8350, close#10927
Fix no focus on edit zone after switching back to Notepad++.
This regression is introduced by ee884f87bbb66d1431f0d530d0cd25bb7cde6b35 (#10910)
ref:
ee884f87bb (commitcomment-62032223)
Added these translations:
* Add "Notepad++ User Defined Languages Collection" project website ... (add9f641043aca953545179f2e2d10690adcf64d)
* Update english.xml (7aa0a563200cba25f7bee3233cf78ded87341d1b)
Close#10848
These logs are written for debugging NUL file-corruption issue (#6133) and session lost issue (#10402) which are still problematic probably.
The writting log info will be triggered only when Windows notifies Notepad++ to end session.
The log file will be in "%APPDATA%\Notepad++\" or in Notepad++ installation folder if doLocalConf.xml is present.
To disable the log, just remove nppLogNulContentCorruptionIssue.xml.
Close#10871
And add log ability for debugging network drive file status detection issue.
To activate log, user should:
1. Add an empty "nppLogNetworkDriveIssue.xml" file beside of notepad++.exe, or if user has no admin previlege, he/she can add this file into %APPDATA%\Notepad++\.
2. Create "C:\temp\" directory, if it doesn't exist yet.
3. Start notepad++.exe, and wait for the file status (timestamp) detection error from the network drive. If the errors occur, there should be some trace in "C:\temp\nppLogNetworkDriveIssue.log".
People who have had the network drive file status detection issue in #10688, #10753, #10757, #10751 & #10787 are welcome to download the binary and provide the generated log in order to fix this issue.
Fix#10751, fix#10688, fix#10753, fix#10757, fix#10751, fix#10787, close#10847
It's rather a bug of Windows' API than the bug of Notepad++. The visual glitch comes from TreeView (FunctionList, Folder As WorkSpace, Project Panels etc ...) but ListView (ASCII Insertion Panel & Document List) works fine.
I have done some fixes about this issue. However, it's not perfect when use mouse to do the snapshot.
OTOH, once the click done to show Notepad++, it becomes normal.
This is the best fix I can offer for this bug.
Fix#2202, fix#2937, fix#5980, fix#8980, fix#9905, fix#10091
This fixes a bug where UDL folding breaks if 1) the file uses
non-Windows line endings and 2) delimiters are defined.
Fix#350, fix#2873, fix#3372, fix#5499, close#7930
Add all missing date time translations from v8.1.5.
Update 42083 and 42078 to not use the word sort (sortieren) because english.xml doesn't either.
Move items 41025 and 44109 to the same order like in english.xml for more easy diffing.
Delete obsolete/doubled item 42079 (it was there two times in german.xml).
Close#10730
This regression is due to the saving routine's change:
9aa9ecb664
Normally, on each save, buffer's timestamp is updated for the future comparison with the timestamp on the disk, in order to detect the modification from outside.
It seems the new saving routing makes the change (ONLY on network disk) with the timestamp before buffer's timestamp, for unknown reason.
The fix is: if timestamp got directly from the file on disk is earlier than buffer's timestamp, it's an absurd case and we ignore it. The buffer's timestamp will be only updated if the file on disk timestamp is later than buffer's one.
Fix#10688, fix#10753, fix#10757, close#10774
Some users encounter the issue that files cannot be saved sometimes.
It's due to the share parameter in CreateFile() set as 0, which makes sense for preventing other process from accessing to the file being written. However, when Notepad++ tries to write the file, it opens the file for writing. If at that moment the file is already opened by other program and the share flag is zero, then the system is instructed to deny opening the file on share conflict and the open fails.
Setting share parameter to "FILE_SHARE_READ" instead of 0 solve this problem.
Fix#10751, close#10765
Comments styles in stylers.model.xml are inconsistent with Scintilla's states
described in /scintilla/include/SciLexer.h. Moreover, block comments are
highlighted with not the same style as line comments, but with style used for
"COMMENT LINE BANG" in other languages.
I eliminated the "COMMENT LINE" style, which Scintilla does not generate, fixed
the "COMMENT BLOCK" style to be the same as regular "COMMENT", and added a
separate style, "COMMENT LINE BANG", for special comments.
Close#10748
Checkboxes "Transparent" of bg & fg color are added for each styler.
The bg color and/or fg color set in current Styler will be ignored and the dark/light theme's bg/fg color will be used, if the checkbox "Transparent" is checked.
To make generic UDL for all dark themes, user has to enable "Transparent" checkboxes for both bg and fg color in "Default Style", then set all the other styles with bg color transparent, or set both non-transparent, according the need of your token to be colorized.
Fix#10738
The PR fixes the regression due to the saving file API being changecd from POSIX functions to Win32 native API:
The old used function "fopen" using "wbc" as argument, according Microsoft document:
"w" Opens an empty file for writing. If the given file exists, its contents are destroyed.
(https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen?view=msvc-160)
so to save a 0 length document, it was unecessary to "write nothing" explicitely on disk, since fopen did it for you.
Whereas our new implementation which uses Win32 native API passes "OPEN_ALWAYS" - that needs to "write nothing" explicitely.
Fix#10699, close#10702
Instead of writting on hard disk little by little all the time,
all data is collected in a string buffer to write once on the disk at the end.
Fix#10678, fix#10674, close#10691
Notepad++ dark mode works fine under Microsft Windows 7, 8, 8.1 & 10.
Under Windows 11 while Notepad++ being switched into dark mode,
the hightlighting (background) of toolbar's hot-track icons remains in light mode.
Hence this workaround to remedy Notepad++ dark mode visual glitchy due to the bug of Windows 11.
Fix#10510, close#10685
When using dark mode with a theme other than DarkModeDefault the background and font color of the theme are not applied to all styles.
This PR fix this bug by adding colorStyle="1" to ignore defined background colour in UDL, and use the default's background colour (theme's one) instead.
Fix#10593, close#10619
This PR make buffer always dirty (with any undo/redo operation) if the editing buffer is unsyncronized with file on disk.
By "unsyncronized", it means:
1. the file is deleted outside but the buffer in Notepad++ is kept.
2. the file is modified by another app but the buffer is not reloaded in Notepad++.
Note that if the buffer is untitled, there's no correspondent file on the disk so the buffer is considered as independent therefore synchronized.
Fix#10401, close#10616
1. Rename CFile to Win32_IO_File (plus some modification in class).
2. Add new method writeStr() in Win32_IO_File class to write "char*" & string.
3. Change method names of Utf8_16_Write class and make writeFile() method return accurate type (boolean).
Close#10612
Uses native Win32 IO API (CreateFile, ReadFile, WriteFile, CloseHandle) instead of POSIX ones (fopen, fread, fwrite, fclose) for remedying NUL file-corruption problem due to system shutting down brutally.
Fix#6133, close#10598
Fixed a condition in a loop which is always true (unsigned >= 0) and can
potentially turn the loop infinite.
And removed a check after the loop which now is also always false.
Close#10597
- Microsoft Visual Studio 2017 (C/C++ Compiler, v141 toolset for win32, x64, arm64)
- Microsoft Visual Studio 2022 version 17.5 (C/C++ Compiler, v143 toolset for win32, x64, arm64)
There are two components which are built from one visual studio solution:
There are three components which are built from one visual studio solution:
- `notepad++.exe`: (contains `libSciLexer.lib`)
- `libSciLexer.lib` : static library based on Scintilla
- `libScintilla.lib` : static library based on [Scintilla](https://www.scintilla.org/)
- `libLexilla.lib` : static library based on [Lexilla](https://www.scintilla.org/Lexilla.html)
Notepad++ is always built **with** Boost regex PCRE support instead of default c++11 regex ECMAScript used by plain Scintilla\SciLexer.
Notepad++ is always built **with** Boost regex PCRE support instead of default c++11 regex ECMAScript used by plain Scintilla.
## Build `notepad++.exe`:
### Build `notepad++.exe`
1. Open [`PowerEditor\visual.net\notepadPlus.sln`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/visual.net/notepadPlus.sln)
2. Select a solution configuration (Debug or Release) and a solution platform (x64 or Win32 or ARM64)
3. Build Notepad++ solution like a normal Visual Studio project. This will also build the dependent SciLexer project.
3. Build Notepad++ solution like a normal Visual Studio project. This will also build the dependent Scintilla and Lexilla projects.
## Build `libSciLexer.lib`:
### Build `libScintilla.lib` and `libLexilla.lib`
As mentioned above, you'll need `libSciLexer.lib` for the Notepad++ build. This is done automatically on building the whole solution. So normally you don't need to care about this.
As mentioned above, you'll need `libScintilla.lib` and `libLexilla.lib` for the Notepad++ build. This is done automatically on building the whole solution. So normally you don't need to care about this.
### Build `libSciLexer.lib` with boost via nmake:
#### Build `libScintilla.lib` with boost and `libLexilla.lib` via nmake
This is not necessary any more and just here for completeness as this option is still available.
Boost is taken from [boost 1.76.0](https://www.boost.org/users/history/version_1_76_0.html) and stripped down to the project needs available at [boost](https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/boostregex/boost) in this repo.
Boost is taken from [boost 1.85.0](https://www.boost.org/users/history/version_1_85_0.html) and stripped down to the project needs available at [boost](https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/boostregex/boost) in this repo.
1. Open the Developer Command Prompt for Visual Studio
2. Go into the `scintilla\win32\`
2. Go into the [`scintilla\win32\`](https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/scintilla/win32/)
3. Build the same configuration as notepad++:
- Release: `nmake -f scintilla.mak`
- Debug: `nmake DEBUG=1 -f scintilla.mak`
- Example:
`nmake -f scintilla.mak`
4. Go into the [`lexilla\src\`](https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/lexilla/src/)
5. Build the same configuration as notepad++:
- Release: `nmake -f lexilla.mak`
- Debug: `nmake DEBUG=1 -f lexilla.mak`
## History:
More about the previous build process: https://community.notepad-plus-plus.org/topic/13959/building-notepad-with-visual-studio-2015-2017
### History
More about the previous build process: <https://community.notepad-plus-plus.org/topic/13959/building-notepad-with-visual-studio-2015-2017>
Since `Notepad++` version 6.0 - 7.9.5, the build of dynamic linked `SciLexer.dll` that is distributed
uses features from Boost's `Boost.Regex` library.
# Building Notepad++ with GCC
## GCC
If you have [MinGW-w64](https://www.mingw-w64.org/) installed, you can compile Notepad++ with GCC.
If you have [MinGW-w64](https://www.mingw-w64.org/) installed, you can compile Notepad++ with GCC. Otherwise MinGW-w64 can be downloaded [here](https://sourceforge.net/projects/mingw-w64/files/). You can also download some collection of tools which supports MinGW-w64, like [MSYS2](https://www.msys2.org/) or [WinLibs](https://winlibs.com/).
MinGW-w64 can be downloaded [here](https://sourceforge.net/projects/mingw-w64/files/). Building Notepad++ is regularly tested on a Windows system with [x86_64-8.1.0-release-posix-seh-rt_v6-rev0](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z) for building 64-bits binary and with [i686-8.1.0-release-posix-dwarf-rt_v6-rev0](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z) versions for building 32-bits binary. Other versions may also work but are untested.
Building Notepad++ is regularly tested on a Windows system by using [MSYS2](https://www.msys2.org/) project. Current versions of tools used to building (such as GCC, Clang, Make or Bash) can be checked by looking at some logs from the finished building (for example in the [current-build page](https://github.com/notepad-plus-plus/notepad-plus-plus/actions/workflows/CI_build.yml). Other versions may also work but are untested.
**Note:** If you use MinGW-w64 GCC from a package (7z), you need to manually add the `$MinGW-root$\bin` directory to the system `PATH` environment variable for the `mingw32-make` invocation below to work. One can use a command like `set PATH=$MinGW-root$\bin;%PATH%` each time `cmd` is launched. But beware that if `PATH` contains several versions of MinGW-w64 GCC, only the first one will be usable.
**Note:** Before building make sure that the system `PATH` environment variable contains `$MinGW-root$\bin` directory. Otherwise you have to set this directory yourself in Windows settings. You can also use a command like `set PATH=$MinGW-root$\bin;%PATH%` each time `cmd` is launched. But beware that if `PATH` contains several versions of MinGW-w64 GCC, only the first one will be usable.
## Compiling Notepad++ binary
### Compiling Notepad++ binary
1. Launch `cmd` and add `$MinGW-root$\bin` to `PATH` if necessary.
2. `cd` into `notepad-plus-plus\PowerEditor\gcc`.
3. Run `mingw32-make`.
4. The 32-bit or 64-bit `notepad++.exe` will be generated either in `bin.i686` or in `bin.x86_64` directory respectively, depending on the target CPU of the compiler — look for the full path to the resulting binary at the end of the build process.
* The directory containing `notepad++.exe` will also contain everything needed for Notepad++ to start.
* To have a debug build just add `DEBUG=1` to the `mingw32-make` invocation above. The output directory then will be suffixed with `-debug`.
* To see commands being executed add `VERBOSE=1` to the same command.
* When switching between compilers or between release/debug modes, `mingw32-make clean` must be executed first.
#### Some additional information
- The directory containing `notepad++.exe` will also contain everything needed for Notepad++ to start.
- To have a debug build just add `DEBUG=1` to the `mingw32-make` invocation above. The output directory then will be suffixed with `-debug`.
- To see commands being executed add `VERBOSE=1` to the same command.
- When a project is built outside of the `PowerEditor/gcc` directory, for example when using `-f` option, then the entire project path must not contain any spaces. Additionally, the path to `makefile` of this project should be listed as first.
- When a project is built through MinGW-w64 with multilib support, a specific target can be forced by passing `TARGET_CPU` variable with `x86_64` or `i686` as value.
- To use Clang instead of GCC for compilation provide `CXX` variable with `clang++` as value.
- To use [Clang analyzer](https://clang-analyzer.llvm.org/) together with Clang provide `CLANGANALYZE=1` to the `mingw32-make` invocation.
@ -8,26 +8,21 @@ Bug reports are appreciated. Following a few guidelines listed below will help s
1. Search the issue tracker to see if it has already been reported.
2. Disable your plugins to see if one of them is the problem. You can do this by renaming your `plugins` folder to something else.
3. Only report an issue with a plugin if it is one of the standard plugins included in the Notepad++ installation. Any other plugin issue should be reported to its respective issue tracker (see e.g. [plugin_list_x86.md](https://github.com/notepad-plus-plus/nppPluginList/blob/master/doc/plugin_list_x86.md) or [plugin_list_x64.md](https://github.com/notepad-plus-plus/nppPluginList/blob/master/doc/plugin_list_x64.md) to find the homepage with further informations on that for a plugins). The standard plugins include (for v7.9.5):
3. Only report an issue with a plugin if it is one of the standard plugins included in the Notepad++ installation. Any other plugin issue should be reported to its respective issue tracker (see e.g. [plugin_list_x86.md](https://github.com/notepad-plus-plus/nppPluginList/blob/master/doc/plugin_list_x86.md) or [plugin_list_x64.md](https://github.com/notepad-plus-plus/nppPluginList/blob/master/doc/plugin_list_x64.md) to find the homepage with further information on that for a plugins). The standard plugins include (for v7.9.5):
* NppExport
* Converter
* mimeTools
4. Include additional information such as:
* A detailed explanation
* Notepad++ Debug-Info containing:
* Operating System version
* Notepad++ version
* List of installed plugins (if it is related to a plugin)
* Screen shots (if applicable)
* ...and any other relevant information
4. Fill the complete information: a template will be shown when you create an issue. Please fill the complete information in the template. To fill the field **Debug Information** you can get it from your Notepad++ via menu `?>Debug Info...`. Please take your time to fill these information. If you don't bother to complete the information we need to help you, we won't bother to solve your problem either.
## Pull Requests
*The first rule of Notepad++ is: you do not ask for permission to contribute.*<br/>
*The second rule of Notepad++ is: you DO NOT ask for permission to contribute.*
Your pull requests are welcome; however, they may not be accepted for various reasons. If you want to make some GUI enhancement like renaming some graphic items or fixing typos, please create the issue instead of the pull requests. All Pull Requests, except for translations and user documentation, need to be attached to a issue on GitHub. For Pull Requests regarding enhancements and questions, the issue must first be approved by one of project's administrators before being merged into the project. An approved issue will have the label `Accepted`. For issues that have not been accepted, you may request to be assigned to that issue.
Opening a issue beforehand allows the administrators and the community to discuss bugs and enhancements before work begins, preventing wasted effort.
Just do your contribution if you have something to offer, and your pull requests are welcome.<br/>
However, they may not be accepted for various reasons. If you want to make some GUI enhancement like renaming some graphic items or fixing typos, please create the issue instead of the pull requests. All Pull Requests, except for translations and user documentation, need to be attached to a issue on GitHub. For Pull Requests regarding enhancements and questions, the issue must first be approved by one of project's administrators before being merged into the project. An approved issue will have the label `Accepted`. For issues that have not been accepted, you may request to be assigned to that issue.
Opening an issue beforehand allows the administrators and the community to discuss bugs and enhancements before work begins, preventing wasted effort.
### Guidelines for pull requests
@ -35,93 +30,129 @@ Opening a issue beforehand allows the administrators and the community to discus
2. Create a new branch for each PR. **Make sure your branch name wasn't used before** - you can add date (for example `patch3_20200528`) to ensure its uniqueness.
3. Single feature or bug-fix per PR.
4. Create a PR with a single commit to make the review process easier.
5. Make your modification compact - don't reformat source code in your request. It makes code review more difficult.
6. PR of reformatting (changing of ws/TAB, line endings or coding style) of source code won't be accepted. Use issue trackers for your request instead.
7. Typo fixing and code refactoring won't be accepted - please create issues with title started with `TYPO` to request the changing.
8. Address the review change requests by pushing new commits to the same PR. Avoid amending a commit and then force pushing it. All the PR commits are squashed before merging to the main branch.
5. For the PR of translation, don't guess or use the next version number. Use the current version number instead.
6. Make your modification compact - don't reformat source code in your request. It makes code review more difficult.
7. PR of reformatting (changing of ws/TAB, line endings or coding style) of source code won't be accepted. Use issue trackers for your request instead.
8. Typo fixing and code refactoring won't be accepted - please create issues with title started with `TYPO` to request the changing.
9. The PR for the enhancement of Function List parser should also include unit test. Please refer [here](https://npp-user-manual.org/docs/function-list/#contribute-your-new-or-enhanced-parser-rule-to-the-notepad-codebase) for more information.
10. Address the review change requests by pushing new commits to the same PR. Avoid amending a commit and then force pushing it. All the PR commits are squashed before merging to the main branch.
11. When creating new PR, try to base it on latest master.
12. Normally you don't need to merge `upstream/master` (using git or via github sync), if your PR is based on older `upstream/master`. If you need to base it on latest `master` (e.g. to check and fix merge conflict), use commands `git fetch upstream` to get latest `master` and then `git rebase upstream/master` to rebase it onto this latest `upstream/master`.
13. Finally, please test your pull requests, at least once.
In short: The easier the code review is, the better the chance your pull request will get accepted.
11. ##### Always use `empty()` for testing if a string is empty or not.
11. Always use `empty()` for testing if a string is empty or not
* Good:
* ###### Good:
```cpp
if (!string.empty())
...
```
* ###### Bad:
* Bad:
```cpp
if (string != "")
...
```
12. Always use `C++ conversion` instead of `C-Style cast`
12. ##### Always use `C++ conversion` instead of `C-Style cast`. Generally, all the conversion among types should be avoided. If you have no choice, use C++ conversion.
* Generally, all the conversion among types should be avoided. If you have no choice, use C++ conversion.
13. ##### Use `!` instead of `not`, `&&` instead of `and`, `||` instead of `or`.
13. Use `!` instead of `not`, `&&` instead of `and`, `||` instead of `or`
* Good:
* ###### Good:
```cpp
if (!::PathFileExists(dir2Search))
```
* ###### Bad:
* Bad:
```cpp
if (not ::PathFileExists(dir2Search))
```
14. Always initialize local and global variables
* For primitive types and enum prefer initialization with `=`.
* For other prefer `{}`-initializer syntax.
* For "numerical" variables using literal suffix can help to convey intention.
```cpp
constexpr float g_globalVariable = 0.0F;
void test()
{
constexpr UINT strLen = 1024U;
wchar_t myString[strLen]{};
}
```
#### NAMING CONVENTIONS
1. ##### Classes uses Pascal Case
1. Classes uses Pascal Case
* Good:
* ###### Good:
```cpp
class IAmAClass
{};
```
* ###### Bad:
* Bad:
```cpp
class iAmAClass
{};
@ -221,15 +327,17 @@ In short: The easier the code review is, the better the chance your pull request
{};
```
2. ##### Methods & method parameters use camel Case
2. Methods & method parameters
* Use camel Case
```cpp
void myMethod(uint myVeryLongParameter);
```
3. ##### Member variables
3. Member variables
Any member variable name of class/struct should be preceded by an underscore.
* Any member variable name of class/struct should be preceded by an underscore.
```cpp
public:
@ -239,44 +347,44 @@ Any member variable name of class/struct should be preceded by an underscore.
float _pAccount;
```
4. ##### Always prefer a variable name that describes what the variable is used for.
4. Always prefer a variable name that describes what the variable is used for
* Good:
* ###### Good:
```cpp
if (hours <24&&minutes<60&&seconds<60)
```
* ###### Bad:
* Bad:
```cpp
if (a <24&&b<60&&c<60)
```
#### COMMENTS
1. ##### Use C++ comment line style than C comment style.
1. Use C++ comment line style rather than C comment style
* ###### Good:
```
* Good:
```cpp
// Two lines comment
// Use still C++ comment line style
```
* ###### Bad:
```
* Bad:
```cpp
/*
Please don't piss me off with that
*/
```
#### BEST PRACTICES
1. ##### Use C++11/14/17 whenever it is possible
1. Use C++11/14/17/20 whenever it is possible.
2. ##### Use C++11 member initialization feature whenever it is possible
2. Use C++11 member initialization feature whenever it is possible.
```cpp
class Foo
@ -285,23 +393,62 @@ Any member variable name of class/struct should be preceded by an underscore.
};
```
3. ##### Prefer Pre-increment:
3. Incrementing
* Prefer Pre-increment
```cpp
++i
```
##### **Over Post-increment:**
* Over Post-increment
```cpp
i++
```
(It does not change anything for built-in types but it would bring consistency)
4. ##### Avoid using pointers. Prefer references. You might need the variable to be assigned a NULL value: in this case the NULL value has semantics and must be checked. Wherever possible, use a SmartPtr instead of old-school pointers.
4. Avoid using pointers. References are preferred instead. You might need the variable to be assigned a `NULL` value: in this case the `NULL` value has semantics and must be checked. Wherever possible, use a SmartPtr instead of old-school pointers.
5. ##### Avoid using new if you can use automatic variable. However, avoid `shared_ptr` as much as possible. Prefer `unique_ptr` instead.
5. Avoid using new if you can use automatic variable. However, avoid `shared_ptr` as much as possible. Prefer `unique_ptr` instead.
6. ##### Don't place any "using namespace" directives in headers.
6. Don't place any "using namespace" directives in headers.
7. ##### Compile time is without incidence. Increasing compile time to reduce execution time is encouraged.
7. Compile time is without incidence. Increasing compile time to reduce execution time is encouraged.
8. ##### Code legibility and length is less important than easy and fast end-user experience.
8. Code legibility and length is less important than easy and fast end-user experience.
9. Prefer `constexpr` over `const` if value can be evaluated at compile time.
10. Check if there are helper functions in headers or lambda functions to reuse them instead of writing new code.
* Example
```cpp
// in StaticDialog.h
isCheckedOrNot();
setChecked();
// in Parameters.cpp
parseYesNoBoolAttribute();
```
11. Check if there are already defined global variables, and reuse them instead of defining new ones.
12. Avoid "Yoda conditions".
* Good:
```cpp
if (iAmYourFather == true)
...
```
* Bad:
```cpp
if (true == iAmYourFather)
...
```
13. Check [C++ Core Guidelines](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md) for additional guidelines.
{"leaves":["\\begin{document}","\\section*{Notes for My Paper}","\\subsection*{How to handle topicalization}","\\begin{tabular}[t]{cccc}","\\subsection*{Mood}"],"root":"unitTest"}
{"leaves":["ctrlData(\r\n po_severity in out nocopy varchar2,\r\n po_err_code in out nocopy varchar2,\r\n po_err_message in out nocopy varchar2,\r\n p_Data in ind_work_data_r\r\n) return boolean","INIT_DECODE_RULES1 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_tabDecRules out nocopy report_utl_pck.tTabDecRules\r\n )","INIT_DECODE_RULES2 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_tabDecRules out nocopy report_utl_pck.tTabDecRules)","GetEsecId\r\nreturn tab1.esec_id%type","pippo","INIT_DECODE_RULES3 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_guid in guid_list_t := guid_list_t()","INIT_DECODE_RULES4 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_guid in guid_list_t := guid_list_t()","INIT_DECODE_RULES5 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2 -- this is a comment with (brackets)","INIT_DECODE_RULES6 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2 -- this is a comment with (brackets)","ctrlData(\r\n po_severity in out nocopy varchar2,\r\n po_err_code in out nocopy varchar2,\r\n po_err_message in out nocopy varchar2,\r\n p_Data in ind_work_data_r\r\n) return boolean\r\nis\r\nbegin\r\n return null","INIT_DECODE_RULES1 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_tabDecRules out nocopy report_utl_pck.tTabDecRules\r\n )","INIT_DECODE_RULES2 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_tabDecRules out nocopy report_utl_pck.tTabDecRules)","GetEsecId\r\nreturn tab1.esec_id%type\r\nis\r\nbegin\r\n return null","pippo","INIT_DECODE_RULES3 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_guid in guid_list_t := guid_list_t()","INIT_DECODE_RULES4 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2\r\n ,po_guid in guid_list_t := guid_list_t()","INIT_DECODE_RULES5 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2 -- this is a comment with (brackets)","INIT_DECODE_RULES6 (po_severity in out varchar2\r\n ,po_err_code in out varchar2\r\n ,po_err_message in out varchar2 -- this is a comment with (brackets)"],"root":"unitTest"}
{"leaves":["\\begin{document}","\\section*{Notes for My Paper}","\\subsection*{How to handle topicalization}","\\begin{tabular}[t]{cccc}","\\subsection*{Mood}"],"root":"unitTest"}
<KeyWordname="atan2"func="yes"><OverloadretVal=""descr="arctangent of Y/X in the range -PI to PI"><Paramname="Y"/><Paramname="X"/></Overload></KeyWord>
<KeyWordname="attach"/>
<KeyWordname="attributes"/>
<KeyWordname="auth_type"/>
<KeyWordname="autoEscape"/>
<KeyWordname="autodie"/>
<KeyWordname="autouse"/>
<KeyWordname="base"/>
<KeyWordname="bigfloat"/>
<KeyWordname="bigint"/>
<KeyWordname="bignum"/>
<KeyWordname="bigrat"/>
<KeyWordname="bind"func="yes"><OverloadretVal=""descr="binds an address to a socket"><Paramname="SOCKET"/><Paramname="NAME"/></Overload></KeyWord>
<KeyWordname="binmode"func="yes"><OverloadretVal=""descr="prepare binary files for I/O"><Paramname="FILEHANDLE"/></Overload><OverloadretVal=""descr="prepare binary files for I/O"><Paramname="FILEHANDLE"/><Paramname="LAYER"/></Overload></KeyWord>
<KeyWordname="bless"func="yes"><OverloadretVal=""descr="create an object"><Paramname="REF"/></Overload><OverloadretVal=""descr="create an object"><Paramname="REF"/><Paramname="CLASSNAME"/></Overload></KeyWord>
<KeyWordname="blib"/>
<KeyWordname="br"/>
<KeyWordname="break"func="yes"><OverloadretVal=""descr="break out of a given block"><Paramname=""/></Overload></KeyWord>
<KeyWordname="builtin"/>
<KeyWordname="button"/>
<KeyWordname="bytes"/>
<KeyWordname="caller"func="yes"><OverloadretVal=""descr="get context of the current subroutine call"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="get context of the current subroutine call"><Paramname=""/></Overload></KeyWord>
<KeyWordname="caption"/>
<KeyWordname="catch"func="yes"><OverloadretVal=""descr="exception handling: catch an exception"><Paramname="BLOCK"/></Overload></KeyWord>
<KeyWordname="charnames"/>
<KeyWordname="chdir"func="yes"><OverloadretVal=""descr="change your current working directory"><Paramname="DIRHANDLE"/></Overload><OverloadretVal=""descr="change your current working directory"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="change your current working directory"><Paramname="FILEHANDLE"/></Overload><OverloadretVal=""descr="change your current working directory"><Paramname=""/></Overload></KeyWord>
<KeyWordname="checkbox"/>
<KeyWordname="checkbox_group"/>
@ -162,6 +176,7 @@
<KeyWordname="chown"func="yes"><OverloadretVal=""descr="change the ownership on a list of files"><Paramname="LIST"/></Overload></KeyWord>
<KeyWordname="chr"func="yes"><OverloadretVal=""descr="get character this number represents"><Paramname="NUMBER"/></Overload><OverloadretVal=""descr="get character this number represents"><Paramname=""/></Overload></KeyWord>
<KeyWordname="chroot"func="yes"><OverloadretVal=""descr="make directory new root for path lookups"><Paramname="FILENAME"/></Overload><OverloadretVal=""descr="make directory new root for path lookups"><Paramname=""/></Overload></KeyWord>
<KeyWordname="class"/>
<KeyWordname="close"func="yes"><OverloadretVal=""descr="close file (or pipe or socket) handle"><Paramname="FILEHANDLE"/></Overload><OverloadretVal=""descr="close file (or pipe or socket) handle"><Paramname=""/></Overload></KeyWord>
<KeyWordname="dbmopen"func="yes"><OverloadretVal=""descr="create binding on a tied dbm file"><Paramname="HASH"/><Paramname="DBNAME"/><Paramname="MASK"/></Overload></KeyWord>
<KeyWordname="default"/>
<KeyWordname="defaults"/>
<KeyWordname="defer"func="yes"><OverloadretVal=""descr="provides a section of code which runs at a later time during scope exit"><Paramname="BLOCK"/></Overload></KeyWord>
<KeyWordname="defined"func="yes"><OverloadretVal=""descr="test whether a value, variable, or function is defined"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="test whether a value, variable, or function is defined"><Paramname=""/></Overload></KeyWord>
<KeyWordname="deiconify"/>
<KeyWordname="delete"func="yes"><OverloadretVal=""descr="deletes a value from a hash"><Paramname="EXPR"/></Overload></KeyWord>
<KeyWordname="delete_all"/>
<KeyWordname="deprecate"/>
<KeyWordname="diagnostics"/>
<KeyWordname="die"func="yes"><OverloadretVal=""descr="raise an exception or bail out"><Paramname="LIST"/></Overload></KeyWord>
<KeyWordname="div"/>
<KeyWordname="do"func="yes"><OverloadretVal=""descr="turn a BLOCK into a TERM"><Paramname="BLOCK"/></Overload><OverloadretVal=""descr="turn a BLOCK into a TERM"><Paramname="EXPR"/></Overload></KeyWord>
@ -189,6 +207,7 @@
<KeyWordname="else"/>
<KeyWordname="elsif"/>
<KeyWordname="em"/>
<KeyWordname="encoding"/>
<KeyWordname="end"/>
<KeyWordname="end_h1"/>
<KeyWordname="end_html"/>
@ -212,10 +231,16 @@
<KeyWordname="exists"func="yes"><OverloadretVal=""descr="test whether a hash key is present"><Paramname="EXPR"/></Overload></KeyWord>
<KeyWordname="exit"func="yes"><OverloadretVal=""descr="terminate this program"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="terminate this program"><Paramname=""/></Overload></KeyWord>
<KeyWordname="exp"func="yes"><OverloadretVal=""descr="raise e to a power"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="raise e to a power"><Paramname=""/></Overload></KeyWord>
<KeyWordname="experimental"/>
<KeyWordname="fc"func="yes"><OverloadretVal=""descr="return casefolded version of a string"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="return casefolded version of a string"><Paramname=""/></Overload></KeyWord>
<KeyWordname="fcntl"func="yes"><OverloadretVal=""descr="file control system call"><Paramname="FILEHANDLE"/><Paramname="FUNCTION"/><Paramname="SCALAR"/></Overload></KeyWord>
<KeyWordname="feature"/>
<KeyWordname="field"/>
<KeyWordname="fields"/>
<KeyWordname="filefield"/>
<KeyWordname="fileno"func="yes"><OverloadretVal=""descr="return file descriptor from filehandle"><Paramname="DIRHANDLE"/></Overload><OverloadretVal=""descr="return file descriptor from filehandle"><Paramname="FILEHANDLE"/></Overload></KeyWord>
<KeyWordname="filetest"/>
<KeyWordname="finally"func="yes"><OverloadretVal=""descr="exception handling: runs block after try/catch"><Paramname="BLOCK"/></Overload></KeyWord>
<KeyWordname="flock"func="yes"><OverloadretVal=""descr="lock an entire file with an advisory lock"><Paramname="FILEHANDLE"/><Paramname="OPERATION"/></Overload></KeyWord>
<KeyWordname="font"/>
<KeyWordname="for"/>
@ -277,7 +302,9 @@
<KeyWordname="index"func="yes"><OverloadretVal=""descr="find a substring within a string"><Paramname="STR"/><Paramname="SUBSTR"/></Overload><OverloadretVal=""descr="find a substring within a string"><Paramname="STR"/><Paramname="SUBSTR"/><Paramname="POSITION"/></Overload></KeyWord>
<KeyWordname="insert"/>
<KeyWordname="int"func="yes"><OverloadretVal=""descr="get the integer portion of a number"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="get the integer portion of a number"><Paramname=""/></Overload></KeyWord>
<KeyWordname="integer"/>
<KeyWordname="ioctl"func="yes"><OverloadretVal=""descr="system-dependent device control system call"><Paramname="FILEHANDLE"/><Paramname="FUNCTION"/><Paramname="SCALAR"/></Overload></KeyWord>
<KeyWordname="isa"/>
<KeyWordname="isindex"/>
<KeyWordname="join"func="yes"><OverloadretVal=""descr="join a list into a string using a separator"><Paramname="EXPR"/><Paramname="LIST"/></Overload></KeyWord>
<KeyWordname="keys"func="yes"><OverloadretVal=""descr="retrieve list of indices from a hash"><Paramname="ARRAY"/></Overload><OverloadretVal=""descr="retrieve list of indices from a hash"><Paramname="HASH"/></Overload></KeyWord>
@ -287,19 +314,25 @@
<KeyWordname="lcfirst"func="yes"><OverloadretVal=""descr="return a string with just the next letter in lower case"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="return a string with just the next letter in lower case"><Paramname=""/></Overload></KeyWord>
<KeyWordname="le"/>
<KeyWordname="length"func="yes"><OverloadretVal=""descr="return the number of characters in a string"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="return the number of characters in a string"><Paramname=""/></Overload></KeyWord>
<KeyWordname="less"/>
<KeyWordname="li"/>
<KeyWordname="lib"/>
<KeyWordname="link"func="yes"><OverloadretVal=""descr="create a hard link in the filesystem"><Paramname="OLDFILE"/><Paramname="NEWFILE"/></Overload></KeyWord>
<KeyWordname="listen"func="yes"><OverloadretVal=""descr="register your socket as a server"><Paramname="SOCKET"/><Paramname="QUEUESIZE"/></Overload></KeyWord>
<KeyWordname="local"func="yes"><OverloadretVal=""descr="create a temporary value for a global variable (dynamic scoping)"><Paramname="EXPR"/></Overload></KeyWord>
<KeyWordname="locale"/>
<KeyWordname="localtime"func="yes"><OverloadretVal=""descr="convert UNIX time into record or string using local time"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="convert UNIX time into record or string using local time"><Paramname=""/></Overload></KeyWord>
<KeyWordname="lock"func="yes"><OverloadretVal=""descr="get a thread lock on a variable, subroutine, or method"><Paramname="THING"/></Overload></KeyWord>
<KeyWordname="log"func="yes"><OverloadretVal=""descr="retrieve the natural logarithm for a number"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="retrieve the natural logarithm for a number"><Paramname=""/></Overload></KeyWord>
<KeyWordname="lstat"func="yes"><OverloadretVal=""descr="stat a symbolic link"><Paramname="DIRHANDLE"/></Overload><OverloadretVal=""descr="stat a symbolic link"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="stat a symbolic link"><Paramname="FILEHANDLE"/></Overload><OverloadretVal=""descr="stat a symbolic link"><Paramname=""/></Overload></KeyWord>
<KeyWordname="lt"/>
<KeyWordname="m"func="yes"><OverloadretVal=""descr="quotes string as substitution regex"><Paramname=""/></Overload></KeyWord>
<KeyWordname="map"func="yes"><OverloadretVal=""descr="apply a change to a list to get back a new list with the changes"><Paramname="BLOCK LIST"/></Overload><OverloadretVal=""descr="apply a change to a list to get back a new list with the changes"><Paramname="EXPR"/><Paramname="LIST"/></Overload></KeyWord>
<KeyWordname="maxsize"/>
<KeyWordname="method"/>
<KeyWordname="minsize"/>
<KeyWordname="mkdir"func="yes"><OverloadretVal=""descr="create a directory"><Paramname="FILENAME"/></Overload><OverloadretVal=""descr="create a directory"><Paramname="FILENAME"/><Paramname="MODE"/></Overload><OverloadretVal=""descr="create a directory"><Paramname=""/></Overload></KeyWord>
<KeyWordname="mro"/>
<KeyWordname="msgctl"func="yes"><OverloadretVal=""descr="SysV IPC message control operations"><Paramname="ID"/><Paramname="CMD"/><Paramname="ARG"/></Overload></KeyWord>
<KeyWordname="msgrcv"func="yes"><OverloadretVal=""descr="receive a SysV IPC message from a message queue"><Paramname="ID"/><Paramname="VAR"/><Paramname="SIZE"/><Paramname="TYPE,FLAGS"/></Overload></KeyWord>
@ -313,16 +346,22 @@
<KeyWordname="no"func="yes"><OverloadretVal=""descr="unimport some module symbols or semantics at compile time"><Paramname="MODULE"/></Overload><OverloadretVal=""descr="unimport some module symbols or semantics at compile time"><Paramname="MODULE LIST"/></Overload><OverloadretVal=""descr="unimport some module symbols or semantics at compile time"><Paramname="MODULE VERSION"/></Overload><OverloadretVal=""descr="unimport some module symbols or semantics at compile time"><Paramname="MODULE VERSION LIST"/></Overload><OverloadretVal=""descr="unimport some module symbols or semantics at compile time"><Paramname="VERSION"/></Overload></KeyWord>
<KeyWordname="not"/>
<KeyWordname="oct"func="yes"><OverloadretVal=""descr="convert a string to an octal number"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="convert a string to an octal number"><Paramname=""/></Overload></KeyWord>
<KeyWordname="ok"/>
<KeyWordname="ol"/>
<KeyWordname="open"func="yes"><OverloadretVal=""descr="open a file, pipe, or descriptor"><Paramname="FILEHANDLE"/></Overload><OverloadretVal=""descr="open a file, pipe, or descriptor"><Paramname="FILEHANDLE"/><Paramname="EXPR"/></Overload><OverloadretVal=""descr="open a file, pipe, or descriptor"><Paramname="FILEHANDLE"/><Paramname="MODE"/><Paramname="EXPR"/></Overload><OverloadretVal=""descr="open a file, pipe, or descriptor"><Paramname="FILEHANDLE"/><Paramname="MODE"/><Paramname="EXPR"/><Paramname="LIST"/></Overload><OverloadretVal=""descr="open a file, pipe, or descriptor"><Paramname="FILEHANDLE"/><Paramname="MODE"/><Paramname="REFERENCE"/></Overload></KeyWord>
<KeyWordname="opendir"func="yes"><OverloadretVal=""descr="open a directory"><Paramname="DIRHANDLE"/><Paramname="EXPR"/></Overload></KeyWord>
<KeyWordname="ops"/>
<KeyWordname="or"/>
<KeyWordname="ord"func="yes"><OverloadretVal=""descr="find a character's numeric representation"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="find a character's numeric representation"><Paramname=""/></Overload></KeyWord>
<KeyWordname="order"/>
<KeyWordname="our"func="yes"><OverloadretVal=""descr="declare and assign a package variable (lexical scoping)"><Paramname="TYPE VARLIST"/></Overload><OverloadretVal=""descr="declare and assign a package variable (lexical scoping)"><Paramname="TYPE VARLIST : ATTRS"/></Overload><OverloadretVal=""descr="declare and assign a package variable (lexical scoping)"><Paramname="VARLIST"/></Overload><OverloadretVal=""descr="declare and assign a package variable (lexical scoping)"><Paramname="VARLIST : ATTRS"/></Overload></KeyWord>
<KeyWordname="overload"/>
<KeyWordname="overloading"/>
<KeyWordname="pack"func="yes"><OverloadretVal=""descr="convert a list into a binary representation"><Paramname="TEMPLATE"/><Paramname="LIST"/></Overload></KeyWord>
<KeyWordname="package"func="yes"><OverloadretVal=""descr="declare a separate global namespace"><Paramname="NAMESPACE"/></Overload><OverloadretVal=""descr="declare a separate global namespace"><Paramname="NAMESPACE BLOCK"/></Overload><OverloadretVal=""descr="declare a separate global namespace"><Paramname="NAMESPACE VERSION"/></Overload><OverloadretVal=""descr="declare a separate global namespace"><Paramname="NAMESPACE VERSION BLOCK"/></Overload></KeyWord>
<KeyWordname="param"/>
<KeyWordname="param_fetch"/>
<KeyWordname="parent"/>
<KeyWordname="password_field"/>
<KeyWordname="path_info"/>
<KeyWordname="pipe"func="yes"><OverloadretVal=""descr="open a pair of connected filehandles"><Paramname="READHANDLE"/><Paramname="WRITEHANDLE"/></Overload></KeyWord>
@ -334,7 +373,9 @@
<KeyWordname="printf"func="yes"><OverloadretVal=""descr="output a formatted list to a filehandle"><Paramname="FILEHANDLE"/></Overload><OverloadretVal=""descr="output a formatted list to a filehandle"><Paramname="FILEHANDLE FORMAT"/><Paramname="LIST"/></Overload><OverloadretVal=""descr="output a formatted list to a filehandle"><Paramname="FORMAT"/><Paramname="LIST"/></Overload><OverloadretVal=""descr="output a formatted list to a filehandle"><Paramname=""/></Overload></KeyWord>
<KeyWordname="prototype"func="yes"><OverloadretVal=""descr="get the prototype (if any) of a subroutine"><Paramname="FUNCTION"/></Overload><OverloadretVal=""descr="get the prototype (if any) of a subroutine"><Paramname=""/></Overload></KeyWord>
<KeyWordname="push"func="yes"><OverloadretVal=""descr="append one or more elements to an array"><Paramname="ARRAY"/><Paramname="LIST"/></Overload></KeyWord>
<KeyWordname="q"func="yes"><OverloadretVal=""descr="singly quote a string"><Paramname=""/></Overload></KeyWord>
<KeyWordname="qq"func="yes"><OverloadretVal=""descr="doubly quote a string"><Paramname=""/></Overload></KeyWord>
<KeyWordname="qr"func="yes"><OverloadretVal=""descr="quotes string as regular expression"><Paramname=""/></Overload></KeyWord>
<KeyWordname="qw"func="yes"><OverloadretVal=""descr="quote a list of words"><Paramname=""/></Overload></KeyWord>
@ -343,6 +384,7 @@
<KeyWordname="raise"/>
<KeyWordname="rand"func="yes"><OverloadretVal=""descr="retrieve the next pseudorandom number"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="retrieve the next pseudorandom number"><Paramname=""/></Overload></KeyWord>
<KeyWordname="raw_cookie"/>
<KeyWordname="re"/>
<KeyWordname="read"func="yes"><OverloadretVal=""descr="fixed-length buffered input from a filehandle"><Paramname="FILEHANDLE"/><Paramname="SCALAR"/><Paramname="LENGTH"/></Overload><OverloadretVal=""descr="fixed-length buffered input from a filehandle"><Paramname="FILEHANDLE"/><Paramname="SCALAR"/><Paramname="LENGTH"/><Paramname="OFFSET"/></Overload></KeyWord>
<KeyWordname="readdir"func="yes"><OverloadretVal=""descr="get a directory from a directory handle"><Paramname="DIRHANDLE"/></Overload></KeyWord>
<KeyWordname="readline"func="yes"><OverloadretVal=""descr="fetch a record from a file"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="fetch a record from a file"><Paramname=""/></Overload></KeyWord>
<KeyWordname="rmdir"func="yes"><OverloadretVal=""descr="remove a directory"><Paramname="FILENAME"/></Overload><OverloadretVal=""descr="remove a directory"><Paramname=""/></Overload></KeyWord>
<KeyWordname="s"func="yes"><OverloadretVal=""descr="quotes string as substitution regex"><Paramname=""/></Overload></KeyWord>
<KeyWordname="say"func="yes"><OverloadretVal=""descr="output a list to a filehandle, appending a newline"><Paramname="FILEHANDLE"/></Overload><OverloadretVal=""descr="output a list to a filehandle, appending a newline"><Paramname="FILEHANDLE LIST"/></Overload><OverloadretVal=""descr="output a list to a filehandle, appending a newline"><Paramname="LIST"/></Overload><OverloadretVal=""descr="output a list to a filehandle, appending a newline"><Paramname=""/></Overload></KeyWord>
<KeyWordname="scalar"func="yes"><OverloadretVal=""descr="force a scalar context"><Paramname="EXPR"/></Overload></KeyWord>
<KeyWordname="shutdown"func="yes"><OverloadretVal=""descr="close down just half of a socket connection"><Paramname="SOCKET"/><Paramname="HOW"/></Overload></KeyWord>
<KeyWordname="sigtrap"/>
<KeyWordname="sin"func="yes"><OverloadretVal=""descr="return the sine of a number"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="return the sine of a number"><Paramname=""/></Overload></KeyWord>
<KeyWordname="size"/>
<KeyWordname="sleep"func="yes"><OverloadretVal=""descr="block for some number of seconds"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="block for some number of seconds"><Paramname=""/></Overload></KeyWord>
<KeyWordname="socket"func="yes"><OverloadretVal=""descr="create a socket"><Paramname="SOCKET"/><Paramname="DOMAIN"/><Paramname="TYPE"/><Paramname="PROTOCOL"/></Overload></KeyWord>
<KeyWordname="socketpair"func="yes"><OverloadretVal=""descr="create a pair of sockets"><Paramname="SOCKET1"/><Paramname="SOCKET2"/><Paramname="DOMAIN"/><Paramname="TYPE,PROTOCOL"/></Overload></KeyWord>
@ -409,6 +454,7 @@
<KeyWordname="sprintf"func="yes"><OverloadretVal=""descr="formatted print into a string"><Paramname="FORMAT"/><Paramname="LIST"/></Overload></KeyWord>
<KeyWordname="srand"func="yes"><OverloadretVal=""descr="seed the random number generator"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="seed the random number generator"><Paramname=""/></Overload></KeyWord>
<KeyWordname="stable"/>
<KeyWordname="start_form"/>
<KeyWordname="start_h1"/>
<KeyWordname="start_html"/>
@ -423,6 +469,7 @@
<KeyWordname="study"func="yes"><OverloadretVal=""descr="no-op, formerly optimized input data for repeated searches"><Paramname="SCALAR"/></Overload><OverloadretVal=""descr="no-op, formerly optimized input data for repeated searches"><Paramname=""/></Overload></KeyWord>
<KeyWordname="sub"func="yes"><OverloadretVal=""descr="declare a subroutine, possibly anonymously"><Paramname="NAME (PROTO) : ATTRS BLOCK"/></Overload><OverloadretVal=""descr="declare a subroutine, possibly anonymously"><Paramname="NAME (PROTO) BLOCK"/></Overload><OverloadretVal=""descr="declare a subroutine, possibly anonymously"><Paramname="NAME : ATTRS BLOCK"/></Overload><OverloadretVal=""descr="declare a subroutine, possibly anonymously"><Paramname="NAME BLOCK"/></Overload></KeyWord>
<KeyWordname="submit"/>
<KeyWordname="subs"/>
<KeyWordname="substr"func="yes"><OverloadretVal=""descr="get or alter a portion of a string"><Paramname="EXPR"/><Paramname="OFFSET"/></Overload><OverloadretVal=""descr="get or alter a portion of a string"><Paramname="EXPR"/><Paramname="OFFSET"/><Paramname="LENGTH"/></Overload><OverloadretVal=""descr="get or alter a portion of a string"><Paramname="EXPR"/><Paramname="OFFSET"/><Paramname="LENGTH"/><Paramname="REPLACEMENT"/></Overload></KeyWord>
<KeyWordname="symlink"func="yes"><OverloadretVal=""descr="create a symbolic link to a file"><Paramname="OLDFILE"/><Paramname="NEWFILE"/></Overload></KeyWord>
<KeyWordname="syscall"func="yes"><OverloadretVal=""descr="execute an arbitrary system call"><Paramname="NUMBER"/><Paramname="LIST"/></Overload></KeyWord>
@ -439,6 +486,7 @@
<KeyWordname="textarea"/>
<KeyWordname="textfield"/>
<KeyWordname="th"/>
<KeyWordname="threads"/>
<KeyWordname="tie"func="yes"><OverloadretVal=""descr="bind a variable to an object class"><Paramname="VARIABLE"/><Paramname="CLASSNAME"/><Paramname="LIST"/></Overload></KeyWord>
<KeyWordname="tied"func="yes"><OverloadretVal=""descr="get a reference to the object underlying a tied variable"><Paramname="VARIABLE"/></Overload></KeyWord>
<KeyWordname="time"func="yes"><OverloadretVal=""descr="return number of seconds since 1970"><Paramname=""/></Overload></KeyWord>
@ -447,6 +495,7 @@
<KeyWordname="tmpFileName"/>
<KeyWordname="top"/>
<KeyWordname="tr"func="yes"><OverloadretVal=""descr="transliterate a string"><Paramname=""/></Overload></KeyWord>
<KeyWordname="try"func="yes"><OverloadretVal=""descr="exception handling: try a block"><Paramname="BLOCK"/></Overload></KeyWord>
<KeyWordname="truncate"func="yes"><OverloadretVal=""descr="shorten a file"><Paramname="EXPR"/><Paramname="LENGTH"/></Overload><OverloadretVal=""descr="shorten a file"><Paramname="FILEHANDLE"/><Paramname="LENGTH"/></Overload></KeyWord>
<KeyWordname="uc"func="yes"><OverloadretVal=""descr="return upper-case version of a string"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="return upper-case version of a string"><Paramname=""/></Overload></KeyWord>
<KeyWordname="ucfirst"func="yes"><OverloadretVal=""descr="return a string with just the next letter in upper case"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="return a string with just the next letter in upper case"><Paramname=""/></Overload></KeyWord>
@ -470,20 +519,26 @@
<KeyWordname="use_named_parameters"/>
<KeyWordname="user_agent"/>
<KeyWordname="user_name"/>
<KeyWordname="utf8"/>
<KeyWordname="utime"func="yes"><OverloadretVal=""descr="set a file's last access and modify times"><Paramname="LIST"/></Overload></KeyWord>
<KeyWordname="values"func="yes"><OverloadretVal=""descr="return a list of the values in a hash"><Paramname="ARRAY"/></Overload><OverloadretVal=""descr="return a list of the values in a hash"><Paramname="HASH"/></Overload></KeyWord>
<KeyWordname="variable"/>
<KeyWordname="vars"/>
<KeyWordname="vec"func="yes"><OverloadretVal=""descr="test or set particular bits in a string"><Paramname="EXPR"/><Paramname="OFFSET"/><Paramname="BITS"/></Overload></KeyWord>
<KeyWordname="version"/>
<KeyWordname="virtual_host"/>
<KeyWordname="vmsish"/>
<KeyWordname="wait"func="yes"><OverloadretVal=""descr="wait for any child process to die"><Paramname=""/></Overload></KeyWord>
<KeyWordname="waitpid"func="yes"><OverloadretVal=""descr="wait for a particular child process to die"><Paramname="PID"/><Paramname="FLAGS"/></Overload></KeyWord>
<KeyWordname="wantarray"func="yes"><OverloadretVal=""descr="get void vs scalar vs list context of current subroutine call"><Paramname=""/></Overload></KeyWord>
<KeyWordname="write"func="yes"><OverloadretVal=""descr="print a picture record"><Paramname="EXPR"/></Overload><OverloadretVal=""descr="print a picture record"><Paramname="FILEHANDLE"/></Overload><OverloadretVal=""descr="print a picture record"><Paramname=""/></Overload></KeyWord>
<KeyWordname="x"/>
<KeyWordname="xor"/>
<KeyWordname="y"func="yes"><OverloadretVal=""descr="transliterate a string (alternate form for tr//)"><Paramname=""/></Overload></KeyWord>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.