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