6309 Commits

Author SHA1 Message Date
Don Ho
ce58b424bd Add Pin tab feature
Fix #5786, close #15750
2024-11-09 03:59:20 +01:00
Coises
5d29f72464 Fix replace field focus losing when Notepad++ is switched back
Fix #6021, close #15756
2024-11-04 19:18:48 +01:00
Don Ho
ba3b4578b2 Notepad++ 8.7.1 release v8.7.1 2024-11-04 14:39:21 +01:00
Don Ho
682570ea6d Fix saved file from new empty doc keeping created time tip issue
Fix https://community.notepad-plus-plus.org/topic/26235/notepad-v8-7-1-release-candidate/11?_=1730165549940
2024-10-31 00:13:35 +01:00
Don Ho
2aa47e3219 Revert "Fix saved file from new empty doc keeping created time tip issue"
This reverts commit 93ecbb004c8a216d17a8b940572a388f010c94ee.
2024-10-31 00:12:37 +01:00
Craftidore
3311924e1c Make auto-completion case sensitive for lua
Fix #15612, close #15613
2024-10-30 02:01:31 +01:00
Don Ho
93ecbb004c Fix saved file from new empty doc keeping created time tip issue
Fix https://community.notepad-plus-plus.org/topic/26235/notepad-v8-7-1-release-candidate/11?_=1730165549940
2024-10-30 01:53:07 +01:00
Juan
ddf7908535 [xml] Update spanish.xml v. 8.7.1
Close #15730
2024-10-29 01:38:58 +01:00
Juan
b29fe57c26 [xml] Update galician.xml v. 8.7.1
Close #15731
2024-10-29 01:33:50 +01:00
xomx
bd415530a3 [xml] Update czech.xml to v8.7.1
Close #15736
2024-10-29 01:29:07 +01:00
xomx
62e6a5378a Fix SaveAs dialog "Append extension" option not working issue
Fix the regression introduced in commit:
f884a39dd4

Fix https://community.notepad-plus-plus.org/topic/26235/notepad-v8-7-1-release-candidate/4
Close #15745
2024-10-29 01:24:22 +01:00
rddim
ef4bedefea [xml] Update Bulgarian localization
Close #15694
2024-10-24 04:27:03 +02:00
Don Ho
c9168cce80 Add 2 unit tests for URL
Follow 7dbb459b55642f48c99bc2e5b806ef7a6e971881
2024-10-23 04:02:19 +02:00
Czespo
7dbb459b55 Fix URL parsing issue with '?' after '#'
Fixes #13583, close #15670
2024-10-22 18:49:19 +02:00
p@pawel-pc
5a02c17803 [xml] Update polish.xml
- Minor fixes and added missing translations

Close #15722
2024-10-21 23:33:14 +02:00
Hugo Carvalho
cc942822fa [xml] Update portuguese.xml
Close #15723
2024-10-21 22:09:48 +02:00
Don Ho
c224a9630e Fix modified Find dialog status msg not being remembered throu sessions
Fix #15724
2024-10-21 17:07:10 +02:00
Karlo-F
911600fa20 [xml] Update Croatian.xml for Notepad++ 8.7
Close #15624
2024-10-21 15:48:23 +02:00
A. Regnander
40c668e77e Update swedish.xml
Updated strings from last english.xml commit, minor correction to existing string

Close #15621
2024-10-21 15:41:33 +02:00
Patriccollu
d34bca6a17 [xml] Update Corsican translation for Notepad++ 8.7.1
Close #15689
2024-10-21 15:35:39 +02:00
~GOLEM~
98a24a4d90 [xml] russian.xml v 8.7.1
Close #15720
2024-10-20 19:42:34 +02:00
schnurlos
f6655850a7 [xml] Update german.xml v8.7
Close #15623
2024-10-20 18:40:29 +02:00
Andrei Miloiu
439456bc43 [XML] Update romanian.xml
Close #15715
2024-10-20 18:25:13 +02:00
Marcellomco
7d9c60ff77 [XML] Update brazilian_portuguese.xml
Close #15710
2024-10-20 18:23:29 +02:00
p@pawel-pc
c8533ddc52 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 #15700
2024-10-20 18:18:58 +02:00
Matteo Concato
5a20b1e54a [XML] Update italian.xml
Close #15699
2024-10-20 18:17:01 +02:00
yasmise
d3687c1b89 [xml] Update japanese.xml
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
2024-10-20 18:10:59 +02:00
kubalav
2097969e73 [xml] Update Slovak translation
Close #15692
2024-10-20 18:08:58 +02:00
Christian Grasser
213e9135ba Update to scintilla 5.5.3 & Lexilla 5.4.1
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
2024-10-20 17:33:07 +02:00
Don Ho
ba8cd8c46f Add one comment for localization file 2024-10-20 15:05:29 +02:00
Don Ho
ad34461261 Make left behide hide line close marker removable
Fix #15713
2024-10-18 03:57:03 +02:00
Adrian Kulawik
5d2bea5b97 Fix hanging issue while hiding lines
Fix #15630, close #15632
2024-10-18 03:55:50 +02:00
Don Ho
bfe835e8a4 Fix wrong messages for replacement status 2024-10-16 16:56:26 +02:00
Don Ho
901014746c Fix Find dialog status bar wrong messaging
Fix #15662
2024-10-16 05:27:29 +02:00
Don Ho
1890ea65f9 Avoid user confusion between Global override & Default Styles
Fix #15640, close #15706
2024-10-16 00:49:44 +02:00
Don Ho
dc9f58ddac Reduce network file hanging issue due to win32API GetFileAttributes cache (unsynchronized).
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
2024-10-15 21:27:44 +02:00
Don Ho
5e3ee3e0e4 Rename variable & enhance the code 2024-10-12 19:32:37 +02:00
Don Ho
3b6f22b357 Fix disconnected network files hanging while saving
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
2024-10-12 04:25:09 +02:00
Don Ho
0ca0348e7f Improve code & refactoring
Close #15681
2024-10-11 19:54:11 +02:00
Don Ho
cd45afc020 Improve GUI for commands for the system tray in Preferences 2024-10-11 04:28:19 +02:00
p@pawel-pc
035ef19b17 Add "Close to system tray" in MISC preference
Fix #4075, fix #11627, close #15617
2024-10-11 04:21:21 +02:00
Don Ho
fdb68db3d6 Fix the wrong detection call 2024-10-10 18:43:42 +02:00
Don Ho
1445487bb7 Fix network files hanging while the network disconnected (part 3)
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, #15540
Close #15679
2024-10-08 21:08:16 +02:00
Don Ho
fb6d79b3af Fix crash on closing a disconnected network file tab
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
2024-10-08 16:48:52 +02:00
Don Ho
d2fb03e41c Make log function easier to be called 2024-10-05 21:47:20 +02:00
Don Ho
a3535f385f Fix network files hanging while the network disconnected (part 2)
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, #15540
Close #15669
2024-10-04 18:04:15 +02:00
Don Ho
f884a39dd4 Fix opened network files hanging issue while the network disconnected
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
2024-10-02 04:52:15 +02:00
Don Ho
fc051a1231 Add tab created time tooltip for new opened untitled tab
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
2024-09-26 18:44:45 +02:00
xomx
8baa1553fc Fix regression: can't open folder via cammand argument
Fix one incorrect PathFileExists replacement.

Fix #15645, close #15646
2024-09-23 16:57:15 +02:00
Don Ho
595074152d Small refactoring 2024-09-19 18:38:07 +02:00