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