Compare commits

...

54 Commits

Author SHA1 Message Date
xomx
4b0fc8d316 Improve Notepad++ UAC operations largely
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
2025-09-02 19:20:59 +02:00
Don HO
dc58d41359 Enhance Column Editor
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
2025-08-31 12:26:19 +02:00
Don Ho
06750919ac Fix column editor egression: insert column with bad parameters
The regression was introduced by: 1a0e8bea75

Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16931#issuecomment-3236873787

Close #16951
2025-08-29 18:52:55 +02:00
PeterCJ
1a0e8bea75 Use radix for GUI input fields to match the output in Column Editor
Use hex/oct/bin for GUI input fields, to match the output, and allow choosing a-f vs A-F for output.

Fix #16912, close #16931
2025-08-29 13:15:47 +02:00
PeterCJ
dab30de9c6 Fix font size inconsistencies
No fontSize definitions except in Default Style, and Default Style always = 10pt

Fix #16924, close #16928
2025-08-20 14:07:05 +02:00
Alan Kilborn
5933f791c4 Prevent stale search-result from making selection inside a multibyte character
Fix #16879, close #16897
2025-08-17 22:40:35 +02:00
Don HO
4467a4c99e Notepad++ 8.8.5 release 2025-08-14 01:32:08 +02:00
Don HO
faaa9bee78 Notepad++ 8.8.4 release 2025-08-12 12:09:17 +02:00
Karlo-F
8b5fafca0b [xml] Update croatian.xml translation
Close #16902
2025-08-10 13:25:49 +02:00
Don HO
b56ac80ff7 Fix MSIX singing issue
"error 0x8007000B: The signature hash method specified (SHA512) must match the hash method used in the app package block map (SHA256)."
"The hashAlgorithm specified in the /fd parameter is incorrect. Rerun SignTool using hashAlgorithm that matches the app package block map (used to create the app package)"

Ref: https://learn.microsoft.com/en-us/windows/msix/package/signing-known-issues

Fix https://github.com/notepad-plus-plus/nppShell/issues/70
2025-08-10 13:08:47 +02:00
xomx
5542066816 [xml] Update czech.xml
Close #16906
2025-08-10 12:35:15 +02:00
wzsx150
aed12006a6 Update chineseSimplified.xml
Added and corrected some translations.

Close #16909
2025-08-10 12:31:24 +02:00
Don HO
df87c76724 Fix "Edit with Notepad++" not removed by uninstaller regression (from v8.8.3)
The regression was introduced by:
889efad2e8 (commitcomment-161831592)

Fix #16896
2025-08-05 18:19:06 +02:00
rddim
67693a84a2 [xml] Update Bulgarian localization
Close #16893
2025-08-03 03:00:36 +02:00
Don Ho
3a90f4f8c3 Make NFO font overridable by adding fontName in Lexer "nfo" of stylers.xml
Fix #16839
2025-08-03 02:49:11 +02:00
ArkadiuszMichalski
559085be82 [xml] Update polish.xml to the latest commit
Close #16890
2025-08-02 18:36:10 +02:00
Tmp341
c9f750fe15 [xml] Update Turkish localization
Close #16793
2025-08-02 04:03:49 +02:00
kubalav
4ddcd0b9a6 [xml] Update Slovak translation
Close #16837
2025-08-02 04:01:48 +02:00
Marcellomco
5f101df77e [xml] Update brazilian_portuguese.xml
Close #16842
2025-08-02 03:59:18 +02:00
yasmise
1ccdacc198 [xml] Update japanese.xml
Close #16844
2025-08-02 03:56:45 +02:00
A. Regnander
fb5f1171b9 Update swedish.xml
Close #16843
2025-08-01 21:23:32 +02:00
~GOLEM~
1afd680efb [xml] Update russian.xml
Close #16851
2025-08-01 21:18:32 +02:00
schnurlos
9e7ab3f0fc [xml] Update german.xml
Close #16853
2025-08-01 21:05:08 +02:00
Patriccollu
8c0db1450b [xml] Update Corsican translation for Notepad++ 8.8.3
Close #16857
2025-08-01 20:55:20 +02:00
Andrei-Valentin Miloiu
a75832cf93 Update romanian.xml
Close #16858
2025-08-01 20:45:40 +02:00
Thomas De Rocker
8abf5814fa Update dutch.xml
Close #16866
2025-08-01 20:41:58 +02:00
Krazal
95996b9db9 [xml] Update hungarian.xml
• Make translation up-to-date (see: d6ad51a, f5a34dc, 22c5063)
• Fix too long (truncated) setting labels/options

Close #16880
2025-08-01 20:39:30 +02:00
PeterCJ
6f65d6fa48 Add pyi extension to Python
Fix #16623, close #16888
2025-08-01 18:07:05 +02:00
Don Ho
76c3e30fe3 Fix JavaScript indent settings incorrect behaviour
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
2025-07-31 18:30:31 +02:00
xomx
c710439b51 Fix possible heap memory leak
Close #16883
2025-07-31 17:41:19 +02:00
Christian Grasser
c367ab8966 Some code improvements
Close #16876
2025-07-30 00:06:08 +02:00
Don Ho
bf6fd373d4 Fix JavaScript listed twice in Language Preferences issue
Fix #16861, fix #4521
2025-07-29 20:23:37 +02:00
Don Ho
8fd2d12ab5 Fix crash on indent settings after changing lang name in lang.xml
Fix #16881, close  #16882
2025-07-29 18:53:20 +02:00
Don Ho
07a49ca0f1 Reduce stack memory usage to eliminate the compiling warning
Follow 36aeb8f681

Close #16874
2025-07-27 16:24:13 +02:00
Don Ho
36aeb8f681 Refactoring: use dynamic allocation to reduce stackoverflow risk
ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16865#issuecomment-3120357091

Close #16871
2025-07-26 19:20:09 +02:00
Don Ho
71fbdae005 Revert "Increase CURRENT_LINESTR variable length of run dialog"
This reverts commit 11bc8107b0947c9b86ce27fd698730497312f65b,
due to the crash caused by stackoverflow.

Fix #16865
2025-07-26 15:40:49 +02:00
Don Ho
11bc8107b0 Increase CURRENT_LINESTR variable length of run dialog
Increase CURRENT_LINESTR variable length from (2048 - 1) to (16384 * 2 - 1).

Fix #16840, close #16859
2025-07-25 14:43:59 +02:00
Don Ho
fe3f609361 Add asNotepad.xml status to Debug Info
Also make debug info readable again.

Fix #16795
2025-07-24 18:46:29 +02:00
Don Ho
22c5063d26 Increase search input length from 2046 to 16383
* 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
2025-07-23 21:00:50 +02:00
Don Ho
f5a34dcc9f Enhance "Go to settings": guide users to the related setting explicitly
Fix #16846, close #16847
2025-07-21 23:45:01 +02:00
Don Ho
1582c67b63 Update tip info 2025-07-21 14:37:02 +02:00
Don HO
fe42d71db7 Update MVS to v17.14 (MS Visual Studio Community 2022)
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
2025-07-20 17:22:56 +02:00
Don Ho
d6ad51a022 Add warning tip for the max length text on search (Find/Replace)
Fix #16749, close #16834
2025-07-20 15:15:11 +02:00
Don HO
0d98bd24f1 Fix -notabbar & asNotepad.xml stop hiding tabbar regression (from v8.7.9)
The regression is due to the refactoring of tabbar:
ff734af115

Fix #16794, close #16825
2025-07-17 17:18:53 +02:00
Don Ho
f897972070 Fix external lexers showing several time in tab_settings
Fix #16462, close #16826
2025-07-17 17:00:10 +02:00
Don HO
47d120a6cf
Fix the validation date of Notetepad++ certificate
Fix #16827
2025-07-17 00:10:08 +02:00
Don Ho
e8b93575be Revert "Fix "Follow Windows" option makes external lexers show twice in tab settings"
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16462#issuecomment-3079457421

This reverts commit f234207f5dd8f45ecd97cb08a21aa993e7469b65.
2025-07-16 23:27:21 +02:00
Don Ho
f234207f5d Fix "Follow Windows" option makes external lexers show twice in tab settings
Fix #16462
2025-07-15 21:10:30 +02:00
Gargaj
a6cd3de8a7 Add button to insert variables in the run dialog
Close #16820
2025-07-15 14:44:17 +02:00
Konstantin Kotenko
a93b533e81 Reword German FolderAsWorspaceSubfolderExists
The German message was incomprehensible and did not mention the workspace panel at all - it was just telling to "remove the folder"

Close #16822
2025-07-15 14:28:52 +02:00
Don Ho
aef5ff18af Remove SHA256 for X.509 certificates 2025-07-12 19:52:38 +02:00
Don Ho
83d5b18d4d Fix resizing Shortcut Mapper height makes a mess
Regression was introduce by:
dddbf24ff5

Fix #16817
2025-07-12 19:44:07 +02:00
Niranjen P
dddbf24ff5 Add a clear button for filter field in Shortcut Mapper
Fix #15742, close #16713
2025-07-11 16:13:51 +02:00
Don HO
45ce3418da
Add more Notepad++ Root Certificate download locations 2025-07-10 00:01:34 +02:00
98 changed files with 2649 additions and 1357 deletions

View File

@ -1,40 +1,25 @@
Notepad++ v8.8.3 vulnerability-fixes & new enhancement:
Notepad++ v8.8.5 regression-fix:
1. Use self-signed certificate to sign new release binaries.
2. Fix uninstaller security issue (CVE-2025-49144).
3. Enhance security for DLL loading.
1. Fix "Edit with Notepad++" context menu not being installed correctly regression.
Notepad++ v8.8.4 vulnerability-fixes, bug-fixes & new enhancement:
Notepad++ v8.8.2 regression-fixes, bug-fixes & new features:
1. Fix regression of folding state not being remembered through sessions.
2. Fix "Go To Settings" links in Style Configurator regression (from v8.8).
3. Fix small regression of tab background (hovered) highlighting issue after drag&drop.
4. Fix an unresponsive (hang) issue due to hide lines.
5. Fix installer security issue by using absolute path instead of unspecified path (CVE-2025-49144).
6. Installer component "WinGUp": update cURL to 8.13.0 for fixing cURL's security issue CVE-2025-0167.
7. Update to scintilla 5.5.7 & Lexilla 5.4.5.
8. Add feature to update Notepad++ on exit.
9. Add `/relaunchNppAfterSilentInstall` command argument for installer.
10. Add feature to set read-only attribute on file so user can toggle (set/remove) read-only attribute of a file.
11. Add new plugin API: NPPM_GETTOOLBARICONSETMODE & NPPN_TOOLBARICONSETCHANGED to get toolbar icon set choice.
12. Deprecate 3 APIs: Deprecate NPPM_GETOPENFILENAMES, NPPM_GETOPENFILENAMESPRIMARY & NPPM_GETOPENFILENAMESSECOND.
13. Add new feature of using first line of untitled document for its tab name.
14. Enhance NPPM_DARKMODESUBCLASSANDTHEME: Enable darkmode progress bar for plugins.
15. Various dark mode enhancements.
16. Fix right click on caption bar unhidding main menu.
17. Fix rename tab error message when tab name is unchanged.
18. Fix Python FunctionList absorbing next function issue if space after colon.
19. Remove .log from errorlist lexer's default extensions.
20. Make raw string syntax highlighting work for Golang.
21. Fix Notepad++ tray icon lost after Windows Taskbar crashing & being relaunched.
22. Fix changing toolbar icon set not updating to matching panel icon set.
23. Fix Windows dialog file list not react with keystroke (character match).
24. Add "*" mark on modified file entries in "Windows" dropdown menu.
1. Fix -notabbar & asNotepad.xml stop hiding tabbar regression (from v8.7.9).
2. Fix "Edit with Notepad++" not removed by uninstaller regression (from v8.8.3).
3. Fix possible heap memory leak.
4. Increase search input length from 2046 to 16383.
5. Add warning tip for the max length on search input (Find/Replace).
6. Fix JavaScript listed twice in Language & Indent settings of Preferences issue.
7. Fix external lexers showing several time in Indent settings issue.
8. Add button to insert variables in the run dialog.
9. Enhance "Go to settings": guide users to the related setting explicitly.
10. Add a clear button for filter field in Shortcut Mapper.
11. Make NFO font overridable by adding font name in Lexer "nfo" of stylers.xml.
Get more info on
https://notepad-plus-plus.org/downloads/v8.8.3/
https://notepad-plus-plus.org/downloads/v8.8.5/
Included plugins:

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Brazilian Portuguese by Hélio de Souza and Luxy, updated: Jul 2021, for Notepad++ 8.1.2; last update by Marcello, 25 Jun 2025
<!-- Brazilian Portuguese by Hélio de Souza and Luxy, updated: Jul 2021, for Notepad++ 8.1.2; last update by Marcello, 24 Jul 2025 for 8.8.3+
Translation note:
1. Please install XML Tools plugin for formatting your XML translation. Via menu "Plugins -> XML Tools-> Pretty Print - indent only" command.
2. All the comments are for explanation, they are not for translation.
-->
<NotepadPlus>
<Native-Langue name="Brazilian Portuguese" filename="brazilian_portuguese.xml" version="8.8.1">
<Native-Langue name="Brazilian Portuguese" filename="brazilian_portuguese.xml" version="8.8.3">
<Menu>
<Main>
<!-- Main Menu Entries -->
@ -1889,6 +1889,9 @@ Se você ativar o modo avançado mas não editar arquivos destas linguagens, a i
<statusbar-Sel value="Sel: "/>
<statusbar-Sel-number value="Sel"/>
<toolbar-accent-tip value="Esta opção faz com que os ícondes de sua barra de ferramentas sigam a cor principal do sistema Windows. A cor principal é a cor de destaque usada em botões, margens, e títulos no Menu Iniciar do Windows. Para alterar, acesse Configurações &gt; Preferências &gt; Cores, e então selecione seu padrão de cores preferido."/>
<max-len-on-search-tip value="São permitidos apenas $INT_REPLACE$ caracteres para tamanho de texto de localização/substituição - o seu texto pode ser truncado, e não será salvo para a próxima sessão."/>
<max-len-on-save-tip value="Este texto de localização (> $INT_REPLACE$ caracteres) não será salvo para a próxima sessão."/>
<goto-setting-tip value="Encontre sua configuração aqui"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -3,7 +3,7 @@
|
| Translators:.....: 2014yyyy Rusi Dimitrov;
| 20072012 Milen Metev (Tragedy);
| Last revision:...: 24.06.2025 by Rusi Dimitrov <npp[at]rdd.anonaddy.com>
| Last revision:...: 02.08.2025 by Rusi Dimitrov <npp[at]rdd.anonaddy.com>
|
\========================================================================== -->
<NotepadPlus>
@ -1814,6 +1814,8 @@ C, C++, Java, C#, Objective-C, PHP, JavaScript, JSP, CSS, Perl, Rust, PowerShell
Ако изберете разширен режим, но не редактирате файлове на гореспоменатите езици, отстъпът ще остане в основен режим."/>
<!-- "Търсене" -->
<searchingInSelThresh-tip value="Брой на избраните символи в зоната за редактиране за автоматично активиране на опцията &quot;В избраното&quot; когато диалога за търсене е активен. Максималната стойност е 1024. Стойност 0 деактивира автоматичната проверка."/>
<max-len-on-search-tip value="Дължината на текста за търсене/замяна е ограничена до $INT_REPLACE$ символа - въведеното може да бъде съкратено и да не бъде запазено за следващата сесия."/>
<max-len-on-save-tip value="Това търсене (> $INT_REPLACE$ символа) няма да бъде запазено за следващата сесия."/>
<!-- "Резервно копие" -->
<backup-select-folder value="Избиране на папка като директория за архивиране"/>
<!-- "Разделител" -->
@ -1857,6 +1859,7 @@ C, C++, Java, C#, Objective-C, PHP, JavaScript, JSP, CSS, Perl, Rust, PowerShell
<close-panel-tip value="Затваряне"/>
<fileSaveAsCopySaveButton-tip value="Задръжте клавиша Shift, докато натискате Запис, за да отворите копието след запазване."/>
<scintillaRenderingTechnology-tip value="Може да се подобри изобразяването на специални символи или да се решат някои графични проблеми. Изисква се рестартиране на Notepad++."/>
<goto-setting-tip value="Намерете настройките си тук"/>
<!-- Лента на състоянието -->
<statusbar-length-lines value="дълж.: $STR_REPLACE1$ редове: $STR_REPLACE2$"/>
<statusbar-Ln-Col value="Ред: $STR_REPLACE1$ Кол: $STR_REPLACE2$"/>

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@ Additionnal information about Corsican localization:
2. History of Corsican translation for Notepad++:
- Updated in 2025 by Patriccollu di Santa Maria è Sichè: Jan. 15th (v8.7.6), Mar. 1st (v8.7.8), Apr. 20th (v8.8),
June 26th (v8.8.1)
June 26th (v8.8.1+), July 24th (v8.8.3+)
- Updated in 2024 by Patriccollu di Santa Maria è Sichè: Feb. 5th (v8.6.3), Mar. 10th (v8.6.5), Apr. 30th (v8.6.6),
June 13th (v8.6.9), Sept. 8th (v8.7), Oct. 21st (v8.7.1), Nov. 20th (v8.7.2), Nov. 29th (v8.7.3)
- Updated in 2023 by Patriccollu di Santa Maria è Sichè: Feb. 24th (v8.5), Mar. 12th (v8.5.1), Mar. 31st (v8.5.2),
@ -36,7 +36,7 @@ Additionnal information about Corsican localization:
https://github.com/Patriccollu/Lingua_Corsa-Infurmatica/blob/ceppu/Prughjetti/Notepad%2B%2B/Traduzzione.md
-->
<NotepadPlus>
<Native-Langue name="Corsu" filename="corsican.xml" version="8.8.1">
<Native-Langue name="Corsu" filename="corsican.xml" version="8.8.3">
<Menu>
<Main>
<!-- Main Menu Entries -->
@ -671,7 +671,7 @@ Additionnal information about Corsican localization:
<Item id="2230" name="Sfurzà a grafia grassa à tutti i stili"/>
<Item id="2231" name="Sfurzà a grafia cursiva à tutti i stili"/>
<Item id="2232" name="Sfurzà a grafia sottulin. à tutti i stili"/>
<Item id="2234" name="Andà à i parametri"/>
<Item id="2234" name="Accede à u parametru"/>
<!-- Don't translate "Global override" -->
<Item id="2235" name="Cosa serà a « Global override » ?"/>
</SubDialog>
@ -1914,6 +1914,9 @@ Sè vo selezziunate u modu espertu ma ùn mudificate micca i schedarii in i l
<statusbar-Sel value="Sel : "/>
<statusbar-Sel-number value="Sel"/>
<toolbar-accent-tip value="Stozzione permette à licone di a vostra barra dattrezzi daduttà u culore daccentuazione di u sistema Windows. U culore daccentuazione hè u culore di messa in evidenza impiegatu da Windows per i buttoni, i bordi è e musaiche di u listinu « Démarrer ». Per mudificallu, accidite à Parametri &gt; Persunalizà &gt; Culori, eppò selezziunate u vostru culore daccentuazione preferitu."/>
<max-len-on-search-tip value="Solu $INT_REPLACE$ caratteri sò permessi per a lunghezza di u testu di ricerca è di rimpiazzamentu - a vostra stampittera puderia esse truncata è ùn seria micca arregistrata per a prossima sessione."/>
<max-len-on-save-tip value="Sta stampittera di ricerca (> $INT_REPLACE$ caratteri) ùn serà micca arregistrata per a prossima sessione."/>
<goto-setting-tip value="Mudificà u parametru quì"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Croatian localization for Notepad++
Updated: June 25, 2025 by Elvis Gambiraža (el.gambo@gmail.com)
Updated: August 5, 2025 by Elvis Gambiraža (el.gambo@gmail.com)
All the comments are for explanation, they are not for translation.
-->
<NotepadPlus>
@ -1909,6 +1909,9 @@ Ako odaberete napredni način, ali ne uređujete datoteke na gore navedenim jezi
<statusbar-Sel value="Ozn: "/>
<statusbar-Sel-number value="Ozn"/>
<toolbar-accent-tip value="Uz ovu opciju ikone na alatnoj traci prate sistemsku akcentiranu boju. Akcentirana boja je boja za isticanje korištena za gumbe, rubove i u Start izborniku Windowsa. Kako bi ju promijenili, idite u Postavke &gt; Personalizacija &gt; Boje i odaberite željenu akcentiranu boju."/>
<max-len-on-search-tip value="Dopuštena je samo $INT_REPLACE$ znakova duljine teksta za pronalaženje/zamjenu - vaš unos bi mogao biti skraćen i neće biti spremljen za sljedeću sesiju."/>
<max-len-on-save-tip value="Ovaj unos za pretraživanje (> $INT_REPLACE$ znakova) neće biti spremljen za sljedeću sesiju."/>
<goto-setting-tip value="Pronađite svoju postavku ovdje"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
- last change: Notepad++ 8.8.1 25/Jun/2025 by Ondřej Müller (mullero@email.cz)
- last change: Notepad++ 8.8.4 7/Aug/2025 by Ondřej Müller (mullero@email.cz)
- N++ Community QA: https://notepad-plus-plus.org/community/topic/87/czech-translations
- contributors: Ondřej Müller (mullero@email.cz), Tomáš Hrouda (gobbet@centrum.cz), Martin Darebný (darBis)
- the most recent version of this file can be downloaded from the project master-branch here: https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/nativeLang/czech.xml
-->
<NotepadPlus>
<Native-Langue name="Čeština" filename="czech.xml" version="8.8.1">
<Native-Langue name="Čeština" filename="czech.xml" version="8.8.3">
<Menu>
<Main>
<!-- Main Menu Entries -->
@ -1890,6 +1890,9 @@ Pokud zvolíte Pokročilý režim, ale nebudete upravovat soubory výše zmíně
<statusbar-Sel value="Ozn: "/>
<statusbar-Sel-number value="Ozn"/>
<toolbar-accent-tip value="Touto volbou vynutíte u ikon nástrojové lišty Notepadu++ použití systémové barvy Windows určené pro zvýrazňování. Tato barva je součástí zvýraznění interaktivních prvků uživatelského rozhraní jako jsou tlačítka, okraje nebo dlaždice Startovní nabídky Windows. Pro její případnou změnu přejděte do systémového Nastavení &gt; Přizpůsobení &gt; Barvy, poté vyberte preferovanou barvu pro zvýrazňování."/>
<max-len-on-search-tip value="Povolená délka textu pro pole Najít/Nahradit je pouze $INT_REPLACE$ znaků - Vámi zadaný text může být zkrácen a neuložen pro další relaci."/>
<max-len-on-save-tip value="Tento vstup (> $INT_REPLACE$ znaků) nebude uložen pro další relaci."/>
<goto-setting-tip value="Nastavení najdete zde"/>
</MiscStrings>
</Native-Langue>

View File

@ -9,10 +9,10 @@ Modifications until 2018-03-26 by Klaas Nekeman (knekeman(at)gmail.com).
Modifications until 2020-05-26 by xylographe <wr86420@gmail.com>.
Modifications from 2021-01-28 and onwards by Thomas De Rocker (RockyTDR, notepadplusplus(at)rockytdr.33mail.com)
Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
Last modified on 2025-07-25 by Thomas De Rocker (RockyTDR).
-->
<NotepadPlus>
<Native-Langue name="Nederlands" filename="dutch.xml" version="8.6.8">
<Native-Langue name="Nederlands" filename="dutch.xml" version="8.8.1">
<Menu>
<Main>
<!-- Main Menu Entries -->
@ -24,7 +24,7 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item menuId="encoding" name="&amp;Tekenset"/>
<Item menuId="language" name="&amp;Syntaxis"/>
<Item menuId="settings" name="&amp;Instellingen"/>
<Item menuId="tools" name="&amp;Gereedschappen"/>
<Item menuId="tools" name="&amp;Gereedschap"/>
<Item menuId="macro" name="&amp;Macro"/>
<Item menuId="run" name="&amp;Uitvoeren"/>
<Item menuId="Plugins" name="&amp;Plugins"/>
@ -100,6 +100,7 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="41003" name="&amp;Sluiten"/>
<Item id="41004" name="&amp;Alles sluiten"/>
<Item id="41005" name="Overige documenten sluiten"/>
<Item id="41026" name="Alle documenten sluiten, behalve vastgemaakte"/>
<Item id="41009" name="Documenten aan de linkerkant sluiten"/>
<Item id="41018" name="Documenten aan de rechterkant sluiten"/>
<Item id="41024" name="Ongewijzigde documenten sluiten"/>
@ -143,6 +144,8 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="42060" name="Regels lexicografisch aflopend sorteren"/>
<Item id="42080" name="Regels lexicografisch oplopend hoofdletterongevoelig sorteren"/>
<Item id="42081" name="Regels lexicografisch aflopend hoofdletterongevoelig sorteren"/>
<Item id="42100" name="Regels op basis van lokale taalinstellingen oplopend sorteren"/>
<Item id="42101" name="Regels op basis van lokale taalinstellingen aflopend sorteren"/>
<Item id="42061" name="Regels als gehele getallen oplopend sorteren"/>
<Item id="42062" name="Regels als gehele getallen aflopend sorteren"/>
<Item id="42063" name="Regels als decimalen (komma) oplopend sorteren"/>
@ -200,13 +203,14 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="42025" name="Momenteel opgenomen macro ops&amp;laan..."/>
<Item id="42026" name="Tekstrichting rechts-links"/>
<Item id="42027" name="Tekstrichting links-rechts"/>
<Item id="42028" name="Instellen als alleen-&amp;lezen"/>
<Item id="42028" name="Alleen-lezen in Notepad++"/>
<Item id="42029" name="Huidig bestandspad kopiëren"/>
<Item id="42030" name="Huidige bestandsnaam kopiëren"/>
<Item id="42031" name="Pad naar huidige map kopiëren"/>
<Item id="42087" name="Alle bestandsnamen kopiëren"/>
<Item id="42088" name="Alle bestandspaden kopiëren"/>
<Item id="42032" name="Macro meerdere keren uitvoeren..."/>
<Item id="42033" name="Alleen-lezen-attribuut in Windows"/>
<Item id="42035" name="Regelcommentaar aan"/>
<Item id="42036" name="Regelcommentaar uit"/>
<Item id="42055" name="Lege regels verwijderen"/>
@ -228,7 +232,7 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="43051" name="Regels zonder bladwijzer wissen"/>
<Item id="43050" name="Bladwijzers omkeren"/>
<Item id="43052" name="Zoeken naar tekens in &amp;bereik..."/>
<Item id="43053" name="Alles selecteren tussen bij elkaar horende &amp;haakjes"/>
<Item id="43053" name="Alles s&amp;electeren tussen {} [] of ()"/>
<Item id="43009" name="Ga naar overeenkomend &amp;haakje"/>
<Item id="43010" name="Vorig&amp;e zoeken"/>
<Item id="43011" name="&amp;Snel zoeken..."/>
@ -361,6 +365,7 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="10005" name="Naar begin verplaatsen"/>
<Item id="10006" name="Naar einde verplaatsen"/>
<Item id="46001" name="Stijlconfigurator..."/>
<Item id="46016" name="Geen (normale tekst)"/>
<Item id="46250" name="Aangepaste syntaxismarkering ontwerpen..."/>
<Item id="46300" name="Map met aangepaste syntaxissen openen..."/>
<Item id="46301" name="Notepad++-collectie van aangepaste syntaxissen"/>
@ -416,17 +421,19 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="11005" name="Pad van Z naar A"/>
<Item id="11006" name="Type van A naar Z"/>
<Item id="11007" name="Type van Z naar A"/>
<Item id="11008" name="Grootte van klein naar groot"/>
<Item id="11009" name="Grootte van groot naar klein"/>
<Item id="11008" name="Inhoudlengte oplopend"/>
<Item id="11009" name="Inhoudlengte aflopend"/>
</Commands>
</Main>
<TabBar>
<Item CMDID="41003" name="Sluiten"/>
<Item CMDID="0" name="Meerdere tabs sluiten"/>
<Item CMDID="41005" name="Overige documenten sluiten"/>
<Item CMDID="41026" name="Alles sluiten, behalve vastgemaakte"/>
<Item CMDID="41009" name="Documenten aan de linkerkant sluiten"/>
<Item CMDID="41018" name="Documenten aan de rechterkant sluiten"/>
<Item CMDID="41024" name="Ongewijzigde documenten sluiten"/>
<Item CMDID="44048" name="Tab vastmaken" alternativeName="Tab losmaken"/>
<Item CMDID="41006" name="Opslaan"/>
<Item CMDID="41008" name="Opslaan als..."/>
<Item CMDID="1" name="Openen in"/>
@ -438,7 +445,8 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item CMDID="41016" name="Naar prullenbak verplaatsen"/>
<Item CMDID="41014" name="Opnieuw laden"/>
<Item CMDID="41010" name="Afdrukken..."/>
<Item CMDID="42028" name="Alleen-lezen"/>
<Item CMDID="42028" name="Alleen-lezen in Notepad++"/>
<Item CMDID="42033" name="Alleen-lezen-attribuut in Windows"/>
<Item CMDID="2" name="Naar klembord kopiëren"/>
<Item CMDID="42029" name="Volledig bestandspad kopiëren"/>
<Item CMDID="42030" name="Bestandsnaam kopiëren"/>
@ -633,14 +641,16 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="2219" name="Standaard trefwoorden"/>
<Item id="2221" name="Aangepaste trefwoorden"/>
<Item id="2225" name="Syntaxis:"/>
<Item id="2226" name="Voorgrondkleur vervangen"/>
<Item id="2227" name="Achtergrondkleur vervangen"/>
<Item id="2228" name="Normaal lettertype vervangen"/>
<Item id="2229" name="Lettergrootte vervangen"/>
<Item id="2230" name="Vet lettertype vervangen"/>
<Item id="2231" name="Cursief lettertype vervangen"/>
<Item id="2232" name="Onderstreept lettertype vervangen"/>
<Item id="2226" name="Voorgrondkleur forceren voor alle stijlen"/>
<Item id="2227" name="Achtergrondkleur forceren voor alle stijlen"/>
<Item id="2228" name="Keuze voor lettertype forceren voor alle stijlen"/>
<Item id="2229" name="Keuze voor lettertype-grootte forceren voor alle stijlen"/>
<Item id="2230" name="Keuze voor vet forceren voor alle stijlen"/>
<Item id="2231" name="Keuze voor cursief forceren voor alle stijlen"/>
<Item id="2232" name="Keuze voor onderstrepen forceren voor alle stijlen"/>
<Item id="2234" name="Naar instellingen gaan"/>
<!-- Don't translate "Global override" -->
<Item id="2235" name="Wat is Global override?"/>
</SubDialog>
</StyleConfig>
@ -755,8 +765,8 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="11005" name="Sorteren op pad van Z naar A"/>
<Item id="11006" name="Sorteren op type van A naar Z"/>
<Item id="11007" name="Sorteren op type van Z naar A"/>
<Item id="11008" name="Sorteren op grootte, van klein naar groot"/>
<Item id="11009" name="Sorteren op grootte, van groot naar klein"/>
<Item id="11008" name="Sorteren op inhoudlengte oplopend"/>
<Item id="11009" name="Sorteren op inhoudlengte aflopend"/>
</MainCommandNames>
</ShortcutMapper>
<ShortcutMapperSubDialg title="Sneltoets">
@ -821,6 +831,7 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Folder title="Algemeen">
<Item id="21101" name="Standaardstijl"/>
<Item id="21102" name="Opmaak"/>
<Item id="21103" name="Online hulp voor aangepaste syntaxis"/>
<Item id="21105" name="Documentatie"/>
<Item id="21106" name="Lege regels samenvouwen"/>
<Item id="21220" name="Code samenvouwen (type 1)"/>
@ -944,41 +955,62 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Preference title="Voorkeuren">
<Item id="6001" name="Sluiten"/>
<Global title="Algemeen">
<Item id="6123" name="Lokalisatie"/>
<Item id="6131" name="Menu"/>
<Item id="6122" name="Menubalk verbergen (tonen met Alt of F10)"/>
<Item id="6132" name="Snelkoppelingen ▼ ✕ rechts verbergen"/>
<Item id="6133" name="Statusbalk"/>
<Item id="6134" name="Verbergen"/>
</Global>
<Toolbar title="Werkbalk">
<Item id="6102" name="Verbergen"/>
<Item id="6103" name="Fluent UI: klein"/>
<Item id="6104" name="Fluent UI: groot"/>
<Item id="6129" name="Gevulde fluent UI: klein"/>
<Item id="6130" name="Gevulde fluent UI: groot"/>
<Item id="6105" name="Standaardpictogrammen: klein"/>
<Item id="6011" name="Kleuren"/>
<Item id="6012" name="Volledig"/>
<Item id="6013" name="Gedeeltelijk"/>
<Item id="6014" name="Kleurkeuze"/>
<Item id="6015" name="Standaard"/>
<Item id="6016" name="Rood"/>
<Item id="6017" name="Groen"/>
<Item id="6018" name="Blauw"/>
<Item id="6019" name="Paars"/>
<Item id="6020" name="Cyaan"/>
<Item id="6021" name="Olijf"/>
<Item id="6022" name="Geel"/>
<Item id="6023" name="Systeemkleur"/>
<Item id="6024" name="Aangepast"/>
</Toolbar>
<Tabbar title="Tabblad-balk">
<Item id="6107" name="Kleine tabs"/>
<Item id="6108" name="Slepen en neerzetten uitschakelen"/>
<Item id="6109" name="Inactieve tabbladen camoufleren"/>
<Item id="6108" name="Vergrendelen (slepen en neerzetten uitschakelen)"/>
<Item id="6109" name="Kleur van inactieve tab wijzigen"/>
<Item id="6110" name="Actieve tabbladen accentueren"/>
<Item id="6112" name="Knop sluiten op elke tab weergeven"/>
<Item id="6111" name="Knoppen weergeven op niet-actieve tabbladen"/>
<Item id="6112" name="Knop sluiten weergeven"/>
<Item id="6113" name="Document sluiten door dubbelklikken"/>
<Item id="6115" name="Functie voor tab vastzetten inschakelen"/>
<Item id="6135" name="Alleen vastgezette knop weergeven"/>
<Item id="6118" name="Verbergen"/>
<Item id="6119" name="Tabs in meerdere rijen weergeven"/>
<Item id="6120" name="Verticale tabs"/>
<Item id="6121" name="Afsluiten bij sluiten van laatste tab"/>
<Item id="6128" name="Alternatieve pictogrammen"/>
<Item id="6133" name="Statusbalk"/>
<Item id="6134" name="Verbergen"/>
<Item id="6131" name="Menu"/>
<Item id="6122" name="Menubalk verbergen (tonen met Alt of F10)"/>
<Item id="6132" name="Snelkoppelingen ▼ ✕ rechts in menubalk verbergen (Notepad++ moet opnieuw worden gestart)"/>
<Item id="6123" name="Taal"/>
</Global>
<Item id="6125" name="Gedrag"/>
<Item id="6126" name="Gedrag en uiterlijk"/>
</Tabbar>
<Scintillas title="Bewerken 1">
<Item id="6216" name="Cursor-instellingen"/>
<Item id="6217" name="Breedte:"/>
<Item id="6219" name="Knippersnelheid:"/>
<Item id="6221" name="100"/>
<Item id="6222" name="0"/>
<Item id="6221" name="Snel"/>
<Item id="6222" name="Traag"/>
<Item id="6246" name="Opdrachten voor in-/uitvouwen van huidig niveau omschakelbaar maken"/>
<Item id="6227" name="Automatische terugloop"/>
<Item id="6228" name="Standaard"/>
@ -990,6 +1022,7 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="6239" name="Selectie behouden bij rechtsklikken buiten selectie"/>
<Item id="6245" name="Virtuele ruimte inschakelen"/>
<Item id="6214" name="Kopiëren/knippen van regel zonder te selecteren inschakelen"/>
<Item id="6225" name="Aangepaste kleur toepassen op voorgrond van geselecteerde tekst"/>
<Item id="6651" name="Indicator voor huidige regel"/>
<Item id="6652" name="Geen"/>
<Item id="6653" name="Achtergrond markeren"/>
@ -1026,10 +1059,10 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="7108" name="Cyaan"/>
<Item id="7109" name="Olijf"/>
<Item id="7115" name="Aangepast"/>
<Item id="7116" name="Bovenkant"/>
<Item id="7117" name="Opgelicht menu (hot-track)"/>
<Item id="7118" name="Actief"/>
<Item id="7119" name="Hoofd"/>
<Item id="7116" name="Inhoud-achtergrond"/>
<Item id="7117" name="Hot-track item"/>
<Item id="7118" name="Bedieningsachtergrond"/>
<Item id="7119" name="Venster-achtergrond"/>
<Item id="7120" name="Fout"/>
<Item id="7121" name="Tekst"/>
<Item id="7122" name="Donkerdere tekst"/>
@ -1082,6 +1115,7 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="6419" name="Nieuw document"/>
<Item id="6420" name="Toepassen op geopende ANSI-bestanden"/>
<Item id="6432" name="Steeds een extra nieuw document openen bij opstarten"/>
<Item id="6433" name="Eerste regel van document gebruiken als naam voor naamloos tabblad"/>
</NewDoc>
<DefaultDir title="Standaardmap">
@ -1097,19 +1131,28 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="4010" name="Geregistreerd:"/>
</FileAssoc>
<Language title="Syntaxismarkering">
<Item id="6505" name="Beschikbare items"/>
<Item id="6506" name="Uitgeschakelde items"/>
<Item id="6507" name="Compacte indeling inschakelen"/>
<Item id="6508" name="Syntaxis-menu"/>
<Item id="6335" name="Backslash als escape-teken behandelen voor SQL"/>
</Language>
<Indentation title="Inspringing">
<Item id="7161" name="Auto-inspringing"/>
<Item id="7162" name="Geen"/>
<Item id="7163" name="Basis"/>
<Item id="7164" name="Geavanceerd"/>
<Item id="6301" name="Inspringing-instellingen"/>
<Item id="6302" name="Spatieteken(s)"/>
<Item id="6303" name="Grootte inspringing:"/>
<Item id="6310" name="Inspringing met:"/>
<Item id="6311" name="Tab-teken"/>
<Item id="6510" name="Standaardwaarde gebruiken"/>
<Item id="6335" name="Backslash als SQL escape-teken behandelen"/>
</Language>
<Item id="6512" name="Backspace-toets verwijdert inspringing in plaats van een spatie"/>
</Indentation>
<Highlighting title="Markeren">
<Item id="6351" name="Alle overeenkomsten van token stileren"/>
@ -1177,6 +1220,7 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Item id="6908" name="Zoekveld vullen met geselecteerde tekst"/>
<Item id="6909" name="Woord onder 'dakje' selecteren wanneer niets geselecteerd is"/>
<Item id="6910" name="Minimale grootte voor automatisch controleren &quot;in selectie&quot;:"/>
<Item id="6913" name="Mapveld voor zoeken in bestanden opvullen gebaseerd op actief document"/>
</Searching>
<RecentFilesHistory title="Recente bestanden">
@ -1193,9 +1237,9 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<Backup title="Back-up">
<Item id="6817" name="Sessie-momentopname en regelmatige back-up"/>
<Item id="6818" name="Sessie-momentopname en regelmatige back-up inschakelen"/>
<Item id="6819" name="Back-up elke"/>
<Item id="6821" name="seconden bijwerken"/>
<Item id="6822" name="Map:"/>
<Item id="6819" name="Back-up triggeren bij wijziging elke"/>
<Item id="6821" name="seconden"/>
<Item id="6822" name="Backup-map:"/>
<Item id="6309" name="Huidige sessie onthouden voor volgende start"/>
<Item id="6825" name="Niet-toegankelijke bestanden van vorige sessie onthouden"/>
<Item id="6801" name="Back-up bij opslaan"/>
@ -1298,15 +1342,35 @@ Last modified on 2024-06-06 by Thomas De Rocker (RockyTDR).
<MISC title="Overig">
<ComboBox id="6347">
<Element name="Inschakelen"/>
<Element name="Inschakelen voor huidig bestand"/>
<Element name="Inschakelen voor alle geopende documenten"/>
<Element name="Uitschakelen"/>
</ComboBox>
<ComboBox id="6307">
<Element name="Geen actie op"/>
<Element name="Minimaliseren naar"/>
<Element name="Sluiten naar"/>
<Element name="Minimaliseren/sluiten naar"/>
</ComboBox>
<ComboBox id="6362">
<Element name="GDI (meest compatibel)"/>
<Element name="DirectWrite (standaard)"/>
<Element name="DirectWrite (frames behouden)"/>
<Element name="DirectWrite (tekenen naar GDI DC)"/>
<Element name="DirectWrite (DirectX 11)"/>
</ComboBox>
<ComboBox id="6364">
<Element name="Uitschakelen"/>
<Element name="Inschakelen bij opstarten van Notepad++"/>
<Element name="Inschakelen bij afsluiten van Notepad++"/>
</ComboBox>
<Item id="6308" name="Naar systeemvak minimaliseren"/>
<Item id="6363" name="rendermodus"/>
<Item id="6365" name="Auto-updater:"/>
<Item id="6312" name="Bestandswijziging detecteren"/>
<Item id="6313" name="In stilte bijwerken"/>
<Item id="6325" name="Na bijwerken naar de laatste regel gaan"/>
<Item id="6322" name="Bestandsextensie sessie:"/>
<Item id="6323" name="Notepad++ automatisch bijwerken"/>
<Item id="6324" name="Wisselen tussen documenten (Ctrl+Tab)"/>
<Item id="6331" name="Alleen de bestandsnaam in de titelbalk weergeven"/>
<Item id="6334" name="Tekenset automatisch detecteren"/>
@ -1385,6 +1449,11 @@ U kunt dit dialoogvenster later terug inschakelen via voorkeuren."/>
<Item id="7" name="&amp;Nee"/>
<Item id="4" name="&amp;Altijd ja"/>
</DoSaveAll><!-- HowToReproduce: Check the "Enable Save All confirm dialog" checkbox in Preference->MISC, now click "Save all" -->
<DebugInfo title="Debug-info">
<Item id="1752" name="&amp;Debug-info naar klembord kopiëren"/>
<Item id="1" name="OK"/>
</DebugInfo>
</Dialog>
<MessageBox>
<!-- $INT_REPLACE$ and $STR_REPLACE$ are place holders, don't translate these place holders. -->
@ -1416,6 +1485,9 @@ Uw online instellingen zullen geannuleerd worden. Stel een coherente waarde in v
<DroppingFolderAsProjectModeWarning title="Ongeldige actie" message="U kunt alleen bestanden of mappen neerzetten, maar niet allebei tegelijk, omdat u in projectmodus map neerzetten zit.
U moet &quot;vij neerzetten van een map alle bestanden openen in plaats van de map als werkruimte te starten&quot; inschakelen in de sectie &quot;standaardmap&quot; van het voorkeurenvenster om deze handeling te laten werken."/>
<SortingError title="Sorteerfout" message="Kan numerieke sortering niet uitvoeren vanwege regel $INT_REPLACE$."/><!-- HowToReproduce: this message prevents from system failure. It's hard to reproduce. -->
<SortLocaleMultiple title="Sorteren niet uitgevoerd" message="Het sorteren van meerdere selecties wordt niet ondersteund."/><!-- HowToReproduce: Make a multiple selection and choose Edit | Line Operations | Sort Lines In Locale Order. -->
<SortLocaleUnknown title="Sorteren mislukt" message="De reden waarom het sorteren mislukte, kan niet worden vastgesteld."/><!-- HowToReproduce: This condition is theoretical; it is unknown what could cause it. -->
<SortLocaleExcept title="Sorteren mislukt" message="$STR_REPLACE$"/><!-- HowToReproduce: Open a large file, e.g. 500MB / 90k lines, in 32-bit Notepad++ and choose Edit | Line Operations | Sort Lines In Locale Order. -->
<ColumnModeTip title="Tip voor kolommodus" message="
Er zijn 3 manieren om over te schakelen naar de kolomselectie-modus:
@ -1486,8 +1558,13 @@ Wilt u doorgaan?"/>
<UDLNewNameError title="UDL-fout" message="Deze naam wordt gebruikt door een andere taal.
Geef een andere naam op."/>
<UDLRemoveCurrentLang title="Huidige taal verwijderen" message="Weet u het zeker?"/>
<UDL_importSuccessful title="Aangepaste syntaxis" message="Importeren gelukt."/>
<UDL_importFails title="Aangepaste syntaxis" message="Importeren mislukt."/>
<UDL_saveBeforeImport title="Aangepaste syntaxis" message="Sla uw syntaxis-definitie op door op de knop &quot;Opslaan Als...&quot; te klikken voordat u exporteert."/> <!-- HowToReproduce: Choose "User Defined Language" in User Language combobox, then click on "Export... button". -->
<UDL_exportSuccessful title="Aangepaste syntaxis" message="Exporteren gelukt."/>
<UDL_exportFails title="Aangepaste syntaxis" message="Exporteren mislukt."/>
<SCMapperDoDeleteOrNot title="Weet u het zeker?" message="Weet u zeker dat u deze snelkoppeling wilt verwijderen?"/>
<FindCharRangeValueError title="Probleem met bereik van waarde" message="U moet een waarde opgeven tussen 0 en 255."/>
<FindCharRangeValueError title="Probleem met bereik van waarde" message="U moet een waarde opgeven tussen 0 en 255."/> <!-- HowToReproduce: Search menu, then Find characters in range, select Custom range, enter 999 in either edit box, press Find. -->
<OpenInAdminMode title="Opslaan mislukt" message="Het bestand kan niet opgeslagen worden en kan beveiligd zijn.
Wilt u Notepad++ starten in beheerdersmodus?"/>
<OpenInAdminModeWithoutCloseCurrent title="Opslaan mislukt" message="Het bestand kan niet opgeslagen worden en kan beveiligd zijn.
@ -1523,6 +1600,15 @@ Wilt u deze plaatshouders aanmaken?
Opmerking: als u ervoor kiest om de plaatshouders niet aan te maken of ze later te sluiten, zal uw sessie worden GEWIJZIGD BIJ HET AFSLUITEN! We raden u aan nu een back-up te maken van uw &quot;session.xml&quot;."/>
<RTLvsDirectWrite title="Kan tekstrichting rechts-links niet uitvoeren" message="Tekstrichting rechts-links is niet compatibel met de modus DirectWrite. Schakel de DirectWrite-modus uit in de overige-sectie van het voorkeurenvenster en start Notepad++ opnieuw."/>
<FileMemoryAllocationFailed title="Uitzondering: toewijzing van bestandsgeheugen mislukt" message="Er is vermoedelijk onvoldoende aaneensluitend vrij geheugen voor het bestand om geladen te worden door Notepad++."/><!-- HowToReproduce: Try to open multiple files with total size > ~700MB in the x86 Notepad++ (it will depend on the PC memory configuration and the current system memory usage...). -->
<FindRegexBackwardDisabled title="Regex achterwaarts zoeken uitgeschakeld" message="Achterwaarts regex zoeken is standaard uitgeschakeld omwille van potentieel onverwachte resultaten. Om een achterwaartse zoekopdracht uit te voeren, opent u het zoekvenster en selecteert u ofwel normale of uitgebreide zoekmodus in plaats van reguliere expressie.
Druk op OK om het zoekvenster te openen en de focus erop te zetten.
Als u de functie voor achterwaarts regex-zoeken nodig hebt, raadpleegt u de gebruikershandleiding voor instructies om ze in te schakelen."/>
<PrintError title="0" message="Kan printer-document niet starten."/><!-- Use title="0" to use Windows OS default translated "Error" title. -->
<FindAutoChangeOfInSelectionWarning title="Zoeken-waarschuwing" message="De status van het vakje &quot;in selectie&quot; is automatisch gewijzigd.
Verifieer de zoekvoorwaarde voordat u de handeling uitvoert."/> <!-- HowToReproduce: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14897#issuecomment-2564316224 -->
<Need2Restart2ShowMenuShortcuts title="Notepad++ moet opnieuw gestart worden" message="Notepad++ nmoet opnieuw gestart worden om snelkoppelingen in het rechter menu weer te geven."/>
<NoAdminRight2ChangeReadOnlyFileAttribute title="Wijzigen van alleen-lezen-attribuut van bestand is mislukt" message="Start Notepad++ als administrator om de bestandsattributen te wijzigen."/>
</MessageBox>
<ClipboardHistory>
<PanelTitle name="Geschiedenis van klembord"/>
@ -1658,8 +1744,9 @@ Zoeken in alle bestanden maar de mappen tests, bin en bin64 uitsluiten:
Zoeken in alle bestanden maar alle log- of logs-mappen recursief uitsluiten:
*.* !+\log*"/><!-- HowToReproduce: Tip of mouse hovered on "Filters" label in "Find in Files" section of Find dialog. -->
<find-in-files-select-folder value="Een map selecteren om in te zoeken"/><!-- HowToReproduce: Search > Find in Files > [...] -->
<find-status-top-reached value="Zoeken: eerste overeenkomst vanaf einde van document gevonden. Het begin van het document is bereikt."/>
<find-status-end-reached value="Zoeken: eerste overeenkomst vanaf begin van document gevonden. Het einde van het document is bereikt."/>
<find-in-files-dir-from-active-doc-tip value="Mapveld vullen gebaseerd op actief document"/><!-- HowToReproduce: Search > Find in Files > [<<] -->
<find-status-top-reached value="Zoeken: begin van document bereikt. Eerste overeenkomst vanaf einde van document gevonden."/>
<find-status-end-reached value="Zoeken: einde van document bereikt. Eerste overeenkomst vanaf begin van document gevonden."/>
<find-status-replaceinfiles-1-replaced value="Vervangen in bestanden: 1 overeenkomst vervangen"/>
<find-status-replaceinfiles-nb-replaced value="Vervangen in bestanden: $INT_REPLACE$ overeenkomsten vervangen"/>
<find-status-replaceinopenedfiles-1-replaced value="Vervangen in geopende bestanden: 1 overeenkomst vervangen"/>
@ -1673,8 +1760,8 @@ Zoeken in alle bestanden maar alle log- of logs-mappen recursief uitsluiten:
<find-status-replaceall-1-replaced value="Alles vervangen: 1 overeenkomst vervangen"/>
<find-status-replaceall-nb-replaced value="Alles vervangen: $INT_REPLACE$ overeenkomsten vervangen"/>
<find-status-replaceall-readonly value="Alles vervangen: kan tekst niet vervangen. Huidig document is alleen-lezen"/>
<find-status-replace-end-reached value="Vervangen: eerste overeenkomst vanaf begin van document vervangen. Het einde van het document is bereikt"/>
<find-status-replace-top-reached value="Vervangen: eerste overeenkomst vanaf einde van document vervangen. Het begin van het document is bereikt"/>
<find-status-replace-end-reached value="Vervangen: einde van document bereikt. Begonnen vanaf begin."/>
<find-status-replace-top-reached value="Vervangen: begin van document bereikt. Begonnen vanaf einde."/>
<find-status-replaced-next-found value="Vervangen: 1 overeenkomst vervangen. Volgende overeenkomst gevonden"/>
<find-status-replaced-without-continuing value="Vervangen: 1 overeenkomst vervangen."/>
<find-status-replaced-next-not-found value="Vervangen: 1 overeenkomst vervangen. Geen nieuwe overeenkomsten gevonden"/>
@ -1691,7 +1778,9 @@ Zoeken in alle bestanden maar alle log- of logs-mappen recursief uitsluiten:
<finder-collapse-all value="Alles samenvouwen"/>
<finder-uncollapse-all value="Alles uitvouwen"/>
<finder-copy value="Geselecteerde regel(s) kopiëren"/>
<finder-copy-selected-paths value="Geselecteerde padnaam/-namen kopiëren"/>
<finder-clear-all value="Alles wissen"/>
<finder-open-selected-paths value="Geselecteerde padnamen openen"/>
<finder-purge-for-every-search value="Leegmaken voor elke zoekopdracht"/>
<finder-wrap-long-lines value="Lange regels laten teruglopen"/>
<common-ok value="Ok"/>
@ -1784,7 +1873,32 @@ Klik op de knop &quot;?&quot; rechts om de website met gebruikershandleiding te
<npcCustomColor-tip value="Ga naar de stijlconfigurator om de standaard aangepaste kleur voor geselecteerde witruimte en niet-afdrukbare tekens te wijzigen (&quot;Non-printing characters custom color&quot;)."/>
<npcIncludeCcUniEol-tip value="Instellingen voor weergave van niet-afdrukbare tekens toepassen op C0, C1 stuurtekens and Unicode-regeleindes (nieuwe regel, regelscheidingsteken en alinea-scheidingsteken)."/>
<searchingInSelThresh-tip value="Aantal geselecteerde tekens in de bewerkingszone zodat het selectievakje &quot;In selectie&quot; automatisch wordt ingeschakeld wanneer het dialoogvenster Zoeken wordt geactiveerd. De maximale waarde is 1024. Stel de waarde in op 0 om automatisch aanvinken uit te schakelen."/>
<verticalEdge-tip value="Voeg uw kolommarkering toe door de positie ervan aan te geven met een decimaal getal. U kunt meerdere kolommarkeringen definiëren door witruimte te gebruiken om de verschillende getallen van elkaar te scheiden.."/>
<fileSaveAsCopySaveButton-tip value="Houd Shift ingedrukt terwijl u op Opslaan drukt om de kopie te openen na het opslaan."/>
<autoIndentBasic-tip value="Zorg ervoor dat de inspringing van de huidige regel (dus de nieuwe regel die is gemaakt door op de ENTER-toets te drukken) overeenkomt met de inspringing van de vorige regel."/>
<autoIndentAdvanced-tip value="Slim inspringen inschakelen voor &quot;C-achtige&quot; talen en Python. De &quot;C-achtige&quot; talen zijn onder andere:
C, C++, Java, C#, Objective-C, PHP, JavaScript, JSP, CSS, Perl, Rust, PowerShell en JSON.
Als u de geavanceerde modus selecteert maar geen bestanden in de bovengenoemde talen bewerkt, blijft de inspringing in de basismodus staan."/>
<!-- Don't translate "Global override" and "Default Style" -->
<global-override-tip value="Als u hier &quot;Global override&quot; inschakelt, wordt die parameter in alle taalstijlen overschreven. Wat u waarschijnlijk echt wilt, is de &quot;Default Style&quot;-instellingen gebruiken"/>
<scintillaRenderingTechnology-tip value="Kan het rendere nvan speciale tekens verbeteren of sommige grafische problemen oplossen. Start Notepad++ opnieuw om de wijzigingen toe te passen."/>
<!-- Due to the limited space on the status bar, if the translations for 'length' & 'lines' are much longer than the English words, please leave them in English instead of translating them. -->
<statusbar-length-lines value="lengte: $STR_REPLACE1$ regels: $STR_REPLACE2$"/>
<!-- Due to the limited space on the status bar, if the translations for 'Ln' & 'Col' are longer than the English words, please leave them in English instead of translating them. -->
<statusbar-Ln-Col value="Reg: $STR_REPLACE1$ Kol: $STR_REPLACE2$"/>
<!-- Due to the limited space on the status bar, if the translations for 'Pos' & 'Sel' are longer than the English words, please leave them in English instead of translating them. -->
<statusbar-Pos value="Pos: "/>
<statusbar-Sel value="Sel: "/>
<statusbar-Sel-number value="Sel"/>
<toolbar-accent-tip value="Met deze optie volgen de pictogrammen op uw werkbalk de accentkleur van het Windows-systeem. De accentkleur is de kleur die wordt gebruikt voor knoppen, randen en tegels in het Startmenu in Windows. Om deze kleur te wijzigen, gaat u naar Instellingen > Personalisatie > Kleuren en selecteert u de gewenste accentkleur."/>
<max-len-on-search-tip value="Slechts $INT_REPLACE$ tekens zijn toegelaten als tekstlengte voor het zoeken/vervangen - uw invoer kan afgekapt worden en zal niet opgeslagen worden voor de volgende sessie."/>
<max-len-on-save-tip value="Deze zoek-invoer (> $INT_REPLACE$ tekens) wordt niet opgeslagen voor de volgende sessie."/>
<goto-setting-tip value="Zoek hier uw instelling"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -1889,6 +1889,9 @@ If you select advanced mode but do not edit files in the aforementioned language
<statusbar-Sel value="Sel: "/>
<statusbar-Sel-number value="Sel"/>
<toolbar-accent-tip value="This option makes your toolbar icons follow Windows system accent color. Accent color is the highlight color used in buttons, borders, and Start menu tiles in Windows. To change it, go to Settings &gt; Personalization &gt; Colors, then select your preferred accent color."/>
<max-len-on-search-tip value="Only $INT_REPLACE$ characters are allowed for the find/replace text length - your input could be truncated, and it won't be saved for the next session."/>
<max-len-on-save-tip value="This search input (> $INT_REPLACE$ characters) won't be saved for the next session."/>
<goto-setting-tip value="Find your setting here"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -1889,6 +1889,9 @@ If you select advanced mode but do not edit files in the aforementioned language
<statusbar-Sel value="Sel: "/>
<statusbar-Sel-number value="Sel"/>
<toolbar-accent-tip value="This option makes your toolbar icons follow Windows system accent color. Accent color is the highlight color used in buttons, borders, and Start menu tiles in Windows. To change it, go to Settings &gt; Personalization &gt; Colors, then select your preferred accent color."/>
<max-len-on-search-tip value="Only $INT_REPLACE$ characters are allowed for the find/replace text length - your input could be truncated, and it won't be saved for the next session."/>
<max-len-on-save-tip value="This search input (> $INT_REPLACE$ characters) won't be saved for the next session."/>
<goto-setting-tip value="Find your setting here"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -639,7 +639,7 @@ Translation note:
<Item id="2230" name="Forcer style gras pour tous les styles"/>
<Item id="2231" name="Forcer italique pour tous les styles"/>
<Item id="2232" name="Forcer souligné pour tous les styles"/>
<Item id="2234" name="Forcera boîte de dialogue Préférences"/>
<Item id="2234" name="Accéder au paramètre"/>
<!-- Don't translate "Global override" -->
<Item id="2235" name="C'est quoi « Global override » ?"/>
</SubDialog>
@ -1884,6 +1884,9 @@ Si vous sélectionnez le mode avancé sans modifier les fichiers des langues men
<statusbar-Sel value="Sel : "/>
<statusbar-Sel-number value="Sel"/>
<toolbar-accent-tip value="Cette option permet aux icônes de votre barre d'outils d'adopter la couleur d'accentuation du système Windows. La couleur d'accentuation est la couleur de surbrillance utilisée pour les boutons, les bordures et les tuiles du menu Démarrer sous Windows. Pour la modifier, accédez à Paramètres &gt; Personnalisation &gt; Couleurs, puis sélectionnez votre couleur d'accentuation préférée."/>
<max-len-on-search-tip value="Seuls $INT_REPLACE$ caractères sont autorisés pour la longueur du texte de recherche/remplacement - votre saisie pourrait être tronquée et ne serait pas enregistrée pour la session suivante."/>
<max-len-on-save-tip value="Cette entrée de recherche (> $INT_REPLACE$ caractères) ne sera pas enregistrée pour la prochaine session."/>
<goto-setting-tip value="Réglage du paramètre ici"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -14,7 +14,7 @@ Translation note:
or a copy at: http://www.should.keepfree.de/N++/german.xml.txt (rename to german.xml)
-->
<NotepadPlus>
<Native-Langue name="Deutsch" filename="german.xml" version="8.8.1"><!-- Datum: 26.06.2025, basiert auf english.xml 8.8.1 vom 26.06.2025 -->
<Native-Langue name="Deutsch" filename="german.xml" version="8.8.1"><!-- Datum: 30.07.2025, basiert auf english.xml 8.8.1 vom 23.07.2025 -->
<Menu>
<Main>
<!-- Main Menu Entries -->
@ -643,8 +643,8 @@ Translation note:
<Item id="2219" name="Standard-Schlüsselwörter:"/>
<Item id="2221" name="Benutzerdefinierte Schlüsselwörter:"/>
<Item id="2225" name="Sprache:"/>
<Item id="2226" name="Erzwinge Vordergrundfarbe f. alle Stile"/>
<Item id="2227" name="Erzwinge Hintergrundfarbe f. alle Stile"/>
<Item id="2226" name="Vordergrundfarbe erzw. f. alle Stile"/>
<Item id="2227" name="Hintergrundfarbe erzw. f. alle Stile"/>
<Item id="2228" name="Erzwinge Schriftart für alle Stile"/>
<Item id="2229" name="Erzwinge Schriftgröße für alle Stile"/>
<Item id="2230" name="Erzwinge Fettschrift für alle Stile"/>
@ -794,7 +794,7 @@ Translation note:
<Item id="20015" name="Importieren …"/>
<Item id="20016" name="Exportieren …"/>
<Item id="20017" name="Abdocken"/>
<StylerDialog title="Stiloptionen für benutzerdefinierte Sprachen">
<StylerDialog title="Stiloptionen für benutzerdefinierte Sprache">
<Item id="25030" name="Schriftoptionen:"/>
<Item id="25006" name="Vordergrundfarbe:"/>
<Item id="25007" name="Hintergrundfarbe:"/>
@ -957,7 +957,7 @@ Translation note:
<Preference title="Optionen">
<Item id="6001" name="S&amp;chließen"/>
<Global title="Allgemein">
<Item id="6123" name="Sprache"/>
<Item id="6123" name="Menüsprache"/>
<Item id="6131" name="Menü"/>
<Item id="6122" name="Ausblenden (Umschalten mit Alt oder F10)"/>
<Item id="6132" name="Schaltflächen ' ▼ ✕' ausblenden"/>
@ -1310,7 +1310,7 @@ Translation note:
<Performance title="Leistung">
<Item id="7141" name="Einschränkung für große Dateien"/>
<Item id="7143" name="Aktivieren der Einschränkung für große Dateien (keine Syntaxhervorhebung)"/>
<Item id="7144" name="Große Dateigröße definieren:"/>
<Item id="7144" name="Große Datei definieren:"/>
<Item id="7146" name="MB (1 - 2046)"/>
<Item id="7147" name="Klammerübereinstimmung zulassen"/>
<Item id="7148" name="Auto-Vervollständigung zulassen"/>
@ -1362,13 +1362,13 @@ Translation note:
<Element name="DirectWrite (DirectX 11)"/>
</ComboBox>
<ComboBox id="6364">
<Element name="Deaktivieren"/>
<Element name="Aktivieren beim Start von Notepad++"/>
<Element name="Aktivieren beim Beenden von Notepad++"/>
<Element name="deaktivieren"/>
<Element name="beim Start von Notepad++"/>
<Element name="beim Beenden von Notepad++"/>
</ComboBox>
<Item id="6308" name="Infobereich (Tray)"/>
<Item id="6363" name="Darstellungsmodus"/>
<Item id="6365" name="Automatische Aktualisierung"/>
<Item id="6365" name="Autom. Aktualisierung"/>
<Item id="6312" name="Automatische Änderungserkennung"/>
<Item id="6313" name="Ohne Rückfrage aktualisieren"/>
<Item id="6325" name="Nach Aktualisierung zum Ende scrollen"/>
@ -1541,8 +1541,8 @@ Soll die Datei trotzdem gespeichert werden?"/>
<LoadLangsFailed title="Konfigurator" message="Laden der Datei 'langs.xml' ist fehlgeschlagen!
Soll die Datei 'langs.xml' wiederhergestellt werden?"/>
<LoadLangsFailedFinal title="Konfigurator" message="Laden der Datei 'langs.xml' ist fehlgeschlagen!"/>
<FolderAsWorspaceSubfolderExists title="'Verzeichnis als Arbeitsbereich'-Problem" message="Ein Unterverzeichnis existiert im Verzeichnis das hinzugefügt werden soll.
Bitte dieses Verzeichnis vorher entfernen bevor das Verzeichnis &quot;$STR_REPLACE$&quot; hinzugefügt wird."/>
<FolderAsWorspaceSubfolderExists title="'Verzeichnis als Arbeitsbereich'-Problem" message="Ein Unterverzeichnis existiert im Verzeichnis, das hinzugefügt werden soll.
Bitte das Unterverzeichnis aus dem Arbeitsbereich entfernen, bevor das Verzeichnis &quot;$STR_REPLACE$&quot; hinzugefügt wird."/>
<ProjectPanelChanged title="$STR_REPLACE$" message="Der Arbeitsbereich wurde geändert. Soll er jetzt gespeichert werden?"/>
<ProjectPanelSaveError title="$STR_REPLACE$" message="Ein Fehler ist beim Speichern der Arbeitsbereichsdatei aufgetreten.
@ -1884,7 +1884,7 @@ C, C++, Java, C#, Objective-C, PHP, JavaScript, JSP, CSS, Perl, Rust, PowerShell
Wenn diese 'Intelligente Einrückung' gewählt wird, aber keine Dateien in den oben genannten Sprachen bearbeitet werden, bleibt die Einrückung im Standard-Modus."/>
<!-- Don't translate "Global override" and "Default Style" -->
<global-override-tip value="Das Aktivieren der 'Global override' überschreibt die Parameter in allen Schriftstilen. Was aber wahrscheinlich stattdessen gewünscht ist, sind die Einstellungen für 'Default Style'"/>
<global-override-tip value="Das Aktivieren von 'Global override' überschreibt die Parameter in allen Schriftstilen. Was aber wahrscheinlich stattdessen gewünscht ist, sind die Einstellungen für 'Default Style'"/>
<scintillaRenderingTechnology-tip value="Verwende DirectWrite (kann die Darstellung von Sonderzeichen verbessern oder einige Grafikprobleme beheben - erfordert einen Neustart von Notepad++."/>
<!-- Due to the limited space on the status bar, if the translations for 'length' & 'lines' are much longer than the English words, please leave them in English instead of translating them. -->
@ -1898,6 +1898,9 @@ Wenn diese 'Intelligente Einrückung' gewählt wird, aber keine Dateien in den o
<statusbar-Sel value="Gew: "/>
<statusbar-Sel-number value="Gew"/>
<toolbar-accent-tip value="Mit dieser Option werden die Symbolleistensymbole der Akzentfarbe des Windows-Systems angepasst. Die Akzentfarbe ist die Farbe, mit der Schaltflächen, Rahmen und Startmenükacheln in Windows hervorgehoben werden. Um sie zu ändern, gehen Sie zu Einstellungen &gt; Personalisierung &gt; Farben und wählen Sie dann Ihre bevorzugte Akzentfarbe."/>
<max-len-on-search-tip value="Es sind nur $INT_REPLACE$ Zeichen erlaubt für die Suchen/Ersetzen-Textlänge - deine Eingabe könnte gekürzt werden und wird für die nächste Sitzung nicht gespeichert."/>
<max-len-on-save-tip value="Diese Sucheingabe (> $INT_REPLACE$ Zeichen) wird für die nächste Sitzung nicht gespeichert."/>
<goto-setting-tip value="Finde hier deine Einstellungen"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -1012,7 +1012,7 @@
<Item id="6234" name="&amp;Érintőpad-problémák miatt a haladó szintű görgetés letiltása"/>
<Item id="6215" name="B&amp;etűsimítás engedélyezése"/>
<Item id="6236" name="Az &amp;utolsó sornál lejjebb görgetés engedélyezése"/>
<Item id="6239" name="Kijelölés &amp;megtartása a kijelölésen kívül jobb egérgombbal történő kattintáskor is"/>
<Item id="6239" name="Kijelölés &amp;megtartása a kijelölésen kívül jobb egérgombbal kattintva is"/>
<Item id="6245" name="S&amp;orvégi virtuális szóközök engedélyezése"/>
<Item id="6214" name="Ki&amp;jelölés nélküli sormásolás és -kivágás engedélyezése"/>
<Item id="6225" name="Eg&amp;yéni szín a kijelölt szöveg előteréhez"/>
@ -1348,21 +1348,21 @@
<ComboBox id="6362">
<Element name="GDI (legjobb kompatibilitás)"/>
<Element name="DirectWrite (alapértelmezett)"/>
<Element name="DirectWrite (képkockamegőrzéssel)"/>
<Element name="DirectWrite (GDI DC-be rajzolással)"/>
<Element name="DirectWrite (képkockamegőrző)"/>
<Element name="DirectWrite (GDI DC-be rajzolva)"/>
<Element name="DirectWrite (DirectX 11-gyel)"/>
</ComboBox>
<ComboBox id="6364">
<Element name="Kikapcsolva"/>
<Element name="Engedélyezve a Notepad++ indításakor"/>
<Element name="Engedélyezve a Notepad++ bezárásakor"/>
<Element name="Engedélyezve Notepad++-indításkor"/>
<Element name="Engedélyezve Notepad++-bezáráskor"/>
</ComboBox>
<Item id="6308" name="az értesítési területre"/>
<Item id="6363" name="renderelési mód"/>
<Item id="6365" name="Aut&amp;omatikus frissítés:"/>
<Item id="6312" name="&amp;Automatikus fájlállapot-felismerés"/>
<Item id="6313" name="&amp;Figyelmeztetés nélküli fájlfrissítés"/>
<Item id="6325" name="F&amp;rissítés után az utolsó sorhoz görgetés"/>
<Item id="6325" name="F&amp;rissítés után utolsó sorhoz görgetés"/>
<Item id="6322" name="A &amp;munkamenetfájl kiterjesztése:"/>
<Item id="6324" name="Dokumentumváltó panel (Ctrl + Tab)"/>
<Item id="6331" name="&amp;Csak a fájlnév megjelenítése a címsorban"/>
@ -1372,7 +1372,7 @@
<Item id="6117" name="A &amp;legutóbbi használat sorrendjével"/>
<Item id="6344" name="Dokumentum-előnézet"/>
<Item id="6345" name="Előné&amp;zeti kép a dokumentumfülön"/>
<Item id="6346" name="Me&amp;gjelenítés a „Dokumentumtérkép”-en"/>
<Item id="6346" name="Me&amp;gjelenítés itt: „Dokumentumtérkép”"/>
<Item id="6360" name="Az &amp;összes hang némítása"/>
<Item id="6361" name="Megerő&amp;sítés kérése „Az összes mentése” esetén"/>
</MISC>
@ -1889,6 +1889,9 @@ Ha a „Haladó szintű” módot választja, de nem a fenti nyelvek fájljait s
<statusbar-Sel value="Kij.: "/>
<statusbar-Sel-number value="Kij."/>
<toolbar-accent-tip value="A beállítással az eszköztár ikonjaira a Windows kiemelőszíne alkalmazható. A kiemelőszín egy, a Windows gombjaiban, szegélyeiben és a Start menüben az elemek hangsúlyozására használt szín. A módosításhoz kattintson a ⚙ Beállítások » Személyre szabás » Színek lehetőségre, majd válassza ki a kívánt Kiemelőszínt"/>
<max-len-on-search-tip value="A „Keresés”/„Csere” szöveghossza legfeljebb $INT_REPLACE$ karakter lehet - előfordulhat, hogy a megadott szöveg vége le lesz vágva, és a következő munkamenetre nem lesz mentve"/>
<max-len-on-save-tip value="Ennek a keresendő szövegnek egy ($INT_REPLACE$ karakter feletti) része nem lesz mentve a következő munkamenetre"/>
<goto-setting-tip value="Keresés a beállítások között"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -1884,6 +1884,9 @@ C、C++、Java、C#、Objective-C、PHP、JavaScript、JSP、CSS、Perl、Rust
<statusbar-Sel value="選択: "/>
<statusbar-Sel-number value="選択"/>
<toolbar-accent-tip value="これを選択すると、ツールバーのアイコン色が Windows のアクセントカラーに従います。Windows のアクセントカラーは、ボタン、枠、スタートメニューのタイルなどのハイライトに使われています。変更するには、Windows の「設定」→「個人用設定」→「色」に進み、アクセントカラーを変更してください。"/>
<max-len-on-search-tip value="検索/置換文字列は $INT_REPLACE$文字までです。超えた分は切り捨てられます。また、次回のセッションに引き継がれません。"/>
<max-len-on-save-tip value="この検索/置換文字列($INT_REPLACE$文字超え)は、次回のセッションに引き継がれません。"/>
<goto-setting-tip value="関連する設定はこちら"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -10,13 +10,13 @@ Translation note:
- Updated by Patryk Skorupa (ppskorupa@outlook.com) to version 7.7.2 (29/07/2019)
- Updated by Cezariusz Marek to version 7.8.3 (11.01.2020)
- Updated by Piotr Kostrzewski (piotrkostrzewski2@@outlook.com) to version 8.7.2 (27.11.2024)
- Updated by Arkadiusz Michalski (webref.pl) to version 8.8.1 (25.06.2025)
- Updated by Arkadiusz Michalski (webref.pl) to version 8.8.3 (02.08.2025)
The most recent version of this file can usually be downloaded from:
https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/installer/nativeLang/polish.xml
-->
<NotepadPlus>
<Native-Langue name="polski" filename="polish.xml" version="8.8.1">
<Native-Langue name="polski" filename="polish.xml" version="8.8.3">
<Menu>
<Main>
<!-- Główne menu -->
@ -1900,6 +1900,9 @@ Jeśli wybierzesz tryb zaawansowany, ale nie edytujesz plików w wymienionych j
<statusbar-Sel value="Selekcja: "/>
<statusbar-Sel-number value="Selekcje"/>
<toolbar-accent-tip value="Ta opcja sprawia, że ikony paska narzędzi są zgodne z wiodącym kolorem systemu Windows. Kolor wiodący to kolor wyróżnienia używany w przyciskach, obramowaniach i kafelkach menu Start w systemie Windows. Aby go zmienić, przejdź kolejno do Ustawienia &gt; Personalizacja &gt; Kolory, a następnie wybierz preferowany kolor wiodący."/>
<max-len-on-search-tip value="Tylko $INT_REPLACE$ znaków jest dozwolonych w polu „Szukany tekst” - wprowadzone dane mogą zostać obcięte i nie zostaną zapisane dla następnej sesji."/>
<max-len-on-save-tip value="Szukany tekst ma więcej niż $INT_REPLACE$ znaków i nie zostanie zapisany dla następnej sesji."/>
<goto-setting-tip value="Tutaj znajdziesz swoje ustawienie"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
- Traducerea în română pentru Notepad++ 8.8.1
- Ultima modificare a fost făcută 25 iunie 2025 de către Miloiu Andrei-Valentin
- Traducerea în română pentru Notepad++ 8.8.3
- Ultima modificare a fost făcută 01 august 2025 de către Miloiu Andrei-Valentin
Modificările din 30 ianuarie 2019 au fost făcute de către Barna Cosmin Marian
Pentru actualizări vizitați: https://github.com/notepad-plus-plus/notepad-plus-plus/tree/master/PowerEditor/installer/nativeLang -->
<NotepadPlus>
<Native-Langue name="Romanian" filename="romanian.xml" version="8.8.1">
<Native-Langue name="Romanian" filename="romanian.xml" version="8.8.3">
<Menu>
<Main>
<!-- Main Menu Entries -->
@ -1130,6 +1130,7 @@
<Item id="6419" name="Document nou"/>
<Item id="6420" name="Se aplică la fișierele ANSI deschise"/>
<Item id="6432" name="Deschide întotdeauna un document nou în plus la pornire"/>
<Item id="6433" name="Folosește prima linie a documentului ca nume de filă fără titlu"/>
</NewDoc>
<DefaultDir title="Folder implicit">
@ -1933,6 +1934,9 @@ Dacă selectezi modul avansat, dar nu editezi fișiere în limbile menționate m
<statusbar-Sel value="Sel: "/>
<statusbar-Sel-number value="Sel"/>
<toolbar-accent-tip value="Această opțiune face ca pictogramele tale din bara de instrumente să urmeze culoarea de accent a sistemului Windows. Culoarea de accent este culoarea de evidențiere folosită la butoane, chenare și borduri din meniul Start din Windows. Ca să o schimbi, mergi la Setări &gt; Personalizare &gt; Culori, apoi selectează-ți culoarea de accent preferată."/>
<max-len-on-search-tip value="Sunt permise doar caractere $INT_REPLACE$ pentru lungimea textului de căutare/înlocuire - datele introduse de tine ar putea fi trunchiate și nu vor fi salvate pentru următoarea sesiune."/>
<max-len-on-save-tip value="Această intrare de căutare (> $INT_REPLACE$ caractere) nu va fi salvată pentru următoarea sesiune."/>
<goto-setting-tip value="Găsește-ți setarea aici"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -5,7 +5,7 @@ Updated to :
- little fixes
-->
<NotepadPlus>
<Native-Langue name="Русский" filename="russian.xml" version="8.8.1">
<Native-Langue name="Русский" filename="russian.xml" version="8.8.3">
<Menu>
<Main>
<!-- Главное Меню -->
@ -1033,27 +1033,32 @@ Updated to :
<Item id="6023" name="Системный"/>
<Item id="6024" name="Пользовательский"/>
</Toolbar>
<Tabbar title="Панель Вкладок">
<Item id="6107" name="Уменьшенный размер"/>
<Item id="6118" name="Скрыть"/>
<Item id="6125" name="Поведение"/>
<Item id="6120" name="Вертикально с левой стороны"/>
<Item id="6119" name="Каскадное отображение"/>
<Item id="6108" name="Запретить перетаскивание"/>
<Item id="6113" name="Закрывать вкладку двойным щелчком"/>
<Item id="6121" name="Выходить при закрытии последней вкладки"/>
<Item id="6126" name="Внешний Вид и Эргономика"/>
<Item id="6107" name="Уменьшенный размер"/>
<Item id="6128" name="Альтернативные значки"/>
<Item id="6109" name="Сменить цвет неактивной вкладки"/>
<Item id="6110" name="Оранжевая линия над активной"/>
<Item id="6111" name="Отображать кнопки неактивных вкладок"/>
<Item id="6112" name="Кнопка закрытия"/>
<Item id="6113" name="Закрывать вкладку двойным щелчком"/>
<Item id="6115" name="Возможность закрепления вкладки"/>
<Item id="6135" name="Отображать только закрепленные кнопки"/>
<Item id="6118" name="Скрыть"/>
<Item id="6119" name="Каскадное отображение"/>
<Item id="6120" name="Вертикально с левой стороны"/>
<Item id="6121" name="Выходить при закрытии последней вкладки"/>
<Item id="6128" name="Альтернативные значки"/>
<Item id="6125" name="Поведение"/>
<Item id="6126" name="Внешний Вид и Ощущение"/>
<Item id="6111" name="Отображать кнопки неактивных вкладок"/>
</Tabbar>
<Scintillas title="Правка 1">
<Item id="6651" name="Индикация Текущей Строки"/>
<Item id="6652" name="Нет"/>
<Item id="6653" name="Выделение Фона"/>
<Item id="6654" name="Рамка"/>
<Item id="6655" name="Ширина:"/>
<Item id="6216" name="Текстовый Курсор"/>
<Item id="6217" name="Ширина"/>
<Item id="6219" name="Частота мерц. :"/>
@ -1065,20 +1070,14 @@ Updated to :
<Item id="6229" name="Выровненный"/>
<Item id="6230" name="С отступом"/>
<Item id="6651" name="Индикация Текущей Строки"/>
<Item id="6652" name="Нет"/>
<Item id="6653" name="Выделение Фона"/>
<Item id="6654" name="Рамка"/>
<Item id="6655" name="Ширина:"/>
<Item id="6215" name="Сглаживание шрифтов"/>
<Item id="6245" name="Разрешить 'Виртуальный Пробел'"/>
<Item id="6246" name="Сделать команды 'Свернуть/Развернуть текущий блок' переключаемыми"/>
<Item id="6239" name="Сохранять выделение текста при правом щелчке за его пределами"/>
<Item id="6236" name="Прокрутка за пределы последней строки документа"/>
<Item id="6234" name="Отключить расширенные функции прокрутки при проблеме с Тачпадом"/>
<Item id="6214" name="Возможность Копировать/Вырезать Строку без её выделения"/>
<Item id="6225" name="Применить пользоват. цвет к переднему плану выбранного текста"/>
<Item id="6236" name="Прокрутка за пределы последней строки документа"/>
<Item id="6234" name="Отключить расширенные функции прокрутки при проблеме с Тачпадом"/>
</Scintillas>
<Scintillas2 title="Правка 2">
<Item id="6521" name="Мультиредактирование"/>
@ -1088,13 +1087,13 @@ Updated to :
<Item id="6247" name="Индикатор Конца Строки (CRLF)"/>
<Item id="6248" name="По Умолчанию"/>
<Item id="6249" name="Обычный текст"/>
<Item id="6256" name="Польз. Цвет"/>
<Item id="6250" name="Пользовательский Цвет"/>
<Item id="6252" name="Непечатаемые символы"/>
<Item id="6260" name="Внешний Вид"/>
<Item id="6254" name="Аббревиатура"/>
<Item id="6255" name="Кодовая Точка"/>
<Item id="6250" name="Польз. Цвет"/>
<Item id="6256" name="Пользовательский Цвет"/>
<Item id="6258" name="Применить настройки внешнего вида к C0, C1 и Юникод EOL"/>
<Item id="6259" name="Запретить ввод управляющего символа (кода C0) в документ"/>
</Scintillas2>
@ -1166,6 +1165,7 @@ Updated to :
<Item id="6419" name="Новый Документ"/>
<Item id="6420" name="Применить к откр. ANSI файлам"/>
<Item id="6432" name="Всегда открывать дополн. новый документ при запуске"/>
<Item id="6433" name="Использовать первую строку документа как имя вкладки без названия"/>
</NewDoc>
<DefaultDir title="Путь По Умолчанию">
<Item id="6413" name="Директория Сохранения и Открытия Файла"/>
@ -1877,6 +1877,9 @@ C, C++, Java, C#, Objective-C, PHP, JavaScript, JSP, CSS, Perl, Rust, PowerShell
<global-override-tip value="Использование &quot;Global override&quot; влияет на все стили языков без исключения, замещая их настройки своими.&#x0A;Возможно, вместо этого вам будет удобнее использовать настройки &quot;Default Style&quot;."/>
<scintillaRenderingTechnology-tip value="Может улучшить отображение специальных символов или решить некоторые проблемы с графикой. Перезапустите Notepad++, чтобы изменения вступили в силу."/>
<toolbar-accent-tip value="Эта опция позволяет значкам панели инструментов соответствовать системному оттенку элементов Windows. Цвет элементов — это цвет подсветки, используемый в кнопках, границах и плитках меню Пуск в Windows. Чтобы изменить его, перейдите в Параметры &gt; Персонализация &gt; Цвета, затем выберите предпочитаемый цвет элементов."/>
<max-len-on-search-tip value="Длина текста для поиска/замены ограничена $INT_REPLACE$ символами — введенные данные могут быть обрезаны."/>
<max-len-on-save-tip value="Этот поисковый ввод (> $INT_REPLACE$ символа) не будет сохранен для следующей сессии."/>
<goto-setting-tip value="Найти свои настройки здесь"/>
<statusbar-length-lines value="длина: $STR_REPLACE1$ строк: $STR_REPLACE2$"/>
<statusbar-Ln-Col value="Стр: $STR_REPLACE1$ Кол: $STR_REPLACE2$"/>
<statusbar-Pos value="Поз: "/>

View File

@ -1887,6 +1887,9 @@ Ak vyberiete pokročilý režim, ale neupravujete súbory vo vyššie uvedených
<statusbar-Sel value="Ozn: "/>
<statusbar-Sel-number value="Ozn"/>
<toolbar-accent-tip value="Táto možnosť spôsobí, že ikony na paneli s nástrojmi budú mať farbu motívu Windowsu. Farba motívu je farba zvýraznenia používaná v tlačidlách, okrajoch a dlaždiciach ponuky Štart vo Windowse. Ak ju chcete zmeniť, prejdite do Nastavenia &gt; Prispôsobenie &gt; Farby, potom vyberte preferovanú farbu."/>
<max-len-on-search-tip value="Povolená dĺžka pre hľadať/nahradiť text je len $INT_REPLACE$ znakov - váš vstup môže byť orezaný, a neuloží sa pre ďalšiu reláciu."/>
<max-len-on-save-tip value="Toto vyhľadávanie (> $INT_REPLACE$ znakov) sa neuloží pre ďalšiu reláciu."/>
<goto-setting-tip value="Nastavenia nájdete tu"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -1889,6 +1889,9 @@ Om du väljer avancerat läge men inte redigerar filer i de omfattande språken
<statusbar-Sel value="Mrk: "/>
<statusbar-Sel-number value="Mrk"/>
<toolbar-accent-tip value="Detta alternativ får ikonerna i ditt verktygsfält att följa systemets accentfärg i Windows. Accentfärgen är den färgmarkering som används för knappar, kantlinjer och startmenyns paneler i Windows. Gå till Inställningar &gt; Anpassning &gt; Färger och välj sedan en önskad accentfärg."/>
<max-len-on-search-tip value="Endast textlängder på $INT_REPLACE$ tecken tillåts för Sök/Ersätt. Din inmatning kanske trunkeras och kommer inte att sparas till nästa session."/>
<goto-setting-tip value="Hitta din inställning här"/>
<max-len-on-save-tip value="Denna sökinmatning (> $INT_REPLACE$ tecken) kommer inte att sparas till nästa session."/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -1708,6 +1708,9 @@ C、C++、Java、C#、Objective-C、PHP、JavaScript、JSP、CSS、Perl、Rust
<statusbar-Sel value="選取:"/>
<statusbar-Sel-number value="選取"/>
<toolbar-accent-tip value="此選項可讓您的工具列圖示遵循 Windows 系統強調色。強調色是 Windows 中的按鈕、邊框和開始功能表圖塊所使用的反白顯示顏色。要更改它,請轉到「設定」&gt;「個性化」&gt;「顏色」,然後選擇您喜歡的強調色。"/>
<max-len-on-search-tip value="尋找/取代文字長度僅允許 $INT_REPLACE$ 個字元 - 您的輸入可能會被截斷,此搜尋輸入也將不會保存以供下次 Notepad++ 啟動時使用。"/>
<max-len-on-save-tip value="此搜尋輸入( > $INT_REPLACE$ 個字元)將不會保存以供下次 Notepad++ 啟動時使用。"/>
<goto-setting-tip value="相關的偏好設定在此"/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -5,7 +5,7 @@
2. Tüm yorumlar açıklama içindir, çeviri için değil.
-->
<NotepadPlus>
<Native-Langue name="Turkish" filename="turkish.xml" version="8.7.3">
<Native-Langue name="Turkish" filename="turkish.xml" version="8.8.1">
<Menu>
<Main>
<!-- Ana Menü Girişleri -->
@ -137,6 +137,8 @@
<Item id="42060" name="Alfabetik Olarak Sırala (Azalan)"/>
<Item id="42080" name="Satırları Alfb. Ve Boyutu Görmezden Gel. Sırala (Artan)"/>
<Item id="42081" name="Satırları Alfb. Ve Boyutu Görmezden Gel. Sırala (Azalan)"/>
<Item id="42100" name="Satırları Yerel Düzende Sırala (Artan)"/>
<Item id="42101" name="Satırları Yerel Düzende Sırala (Azalan)"/>
<Item id="42061" name="Tam Sayı Olarak Sırala (Artan)"/>
<Item id="42062" name="Tam Sayı Olarak Sırala (Azalan)"/>
<Item id="42063" name="Virgüle Göre Ondalıklı Olarak Sırala (Artan)"/>
@ -194,13 +196,14 @@
<Item id="42025" name="&amp;Geçerli Makroyu Kaydet..."/>
<Item id="42026" name="Sağdan Sola Metin Yönü"/>
<Item id="42027" name="Soldan Sağa Metin Yönü"/>
<Item id="42028" name="Salt Okunur Yap"/>
<Item id="42028" name="Notepad++ Üzerinde Salt Okunur"/>
<Item id="42029" name="Geçerli Dosyanın Yolunu Kopyala"/>
<Item id="42030" name="Geçerli Dosya Adını Kopyala"/>
<Item id="42031" name="Geçerli Dizin Yolunu Kopyala"/>
<Item id="42087" name="Tüm Dosya Adlarını Kopyala"/>
<Item id="42088" name="Tüm Dosya Yollarını Kopyala"/>
<Item id="42032" name="&amp;Makroyu Birden Çok Kez Çalıştır"/>
<Item id="42033" name="Windows Üzerinde Salt Okunur Özniteliği"/>
<Item id="42035" name="Tek Satır Yorum Alanı Aç"/>
<Item id="42036" name="Tek Satır Yorum Alanını Kapat"/>
<Item id="42055" name="Boş Satırları Kaldır"/>
@ -435,7 +438,8 @@
<Item CMDID="41016" name="Çöp Kutusuna Taşı"/>
<Item CMDID="41014" name="Yeniden Yükle"/>
<Item CMDID="41010" name="Yazdır..."/>
<Item CMDID="42028" name="Salt Okunur"/>
<Item CMDID="42028" name="Notepad++ Üzerinde Salt Okunur"/>
<Item CMDID="42033" name="Windows Üzerinde Salt Okunur Özniteliği"/>
<Item CMDID="2" name="Panoya Kopyala"/>
<Item CMDID="42029" name="Tam Dosya Yolunu Kopyala"/>
<Item CMDID="42030" name="Dosya Adını Kopyala"/>
@ -823,6 +827,7 @@
<Folder title="Klasör &amp;&amp; Varsayılanlar">
<Item id="21101" name="Varsayılan Stil"/>
<Item id="21102" name="Stilci…"/>
<Item id="21103" name="Kullanıcı Tanımlı Diller çevrimiçi yardım"/>
<Item id="21105" name="Belgelendirme"/>
<Item id="21106" name="&amp;Sıkı kapat (boş satırları da kapat)"/>
<Item id="21220" name="Kod 1 Stilinde Kapat"/>
@ -946,36 +951,56 @@
<Preference title="Tercihler">
<Item id="6001" name="Kapat"/>
<Global title="Genel">
<Item id="6123" name="Yerelleştirme"/>
<Item id="6131" name="Menü"/>
<Item id="6122" name="Gizle (Alt ya da F10 tuşuyla geçiş yapın)"/>
<Item id="6132" name="Sağdaki Kısayolları Gizle ▼ ✕"/>
<Item id="6133" name="Durum Çubuğu"/>
<Item id="6134" name="Gizle"/>
</Global>
<Toolbar title="Toolbar">
<Item id="6102" name="Gizle"/>
<Item id="6103" name="Fluent Arayüz: küçük"/>
<Item id="6104" name="Fluent Arayüz: geniş"/>
<Item id="6129" name="Dolgun Fluent Arayüz: küçük"/>
<Item id="6130" name="Dolgun Fluent Arayüz: geniş"/>
<Item id="6105" name="Standart Simgeler: küçük"/>
<Item id="6011" name="Renklendirme"/>
<Item id="6012" name="Tamamı"/>
<Item id="6013" name="Kısmi"/>
<Item id="6014" name="Renk tercihi"/>
<Item id="6015" name="Varsayılan"/>
<Item id="6016" name="Kırmızı"/>
<Item id="6017" name="Yeşil"/>
<Item id="6018" name="Mavi"/>
<Item id="6019" name="Mor"/>
<Item id="6020" name="Açık Mavi"/>
<Item id="6021" name="Zeytin Yeşili"/>
<Item id="6022" name="Sarı"/>
<Item id="6023" name="Sistem Tonu"/>
<Item id="6024" name="Kişisel"/>
</Toolbar>
<Tabbar title="Sekme Çubuğu">
<Item id="6107" name="Küçült"/>
<Item id="6108" name="Kilitle (sürükle ve bırak devre dışı)"/>
<Item id="6109" name="Etkin olmayan sekme rengini değiştir"/>
<Item id="6110" name="Etkin sekmede renkli bir çubuk çiz"/>
<Item id="6112" name="Her sekmede kapatma tuşunu göster"/>
<Item id="6111" name="Etkin olmayan sekmelerde düğmeleri göster"/>
<Item id="6112" name="Kapatma tuşunu göster"/>
<Item id="6113" name="Çift tıklandığında belgeyi kapat"/>
<Item id="6115" name="Sekme sabitleme özelliğini etkinleştir"/>
<Item id="6135" name="Sadece sabitlenmiş düğmeyi göster"/>
<Item id="6118" name="Gizle"/>
<Item id="6119" name="Çoklu satır"/>
<Item id="6120" name="Dikey"/>
<Item id="6121" name="Kapatılan son sekmeden çık"/>
<Item id="6128" name="Alternatif Simgeler"/>
<Item id="6133" name="Durum Çubuğu"/>
<Item id="6134" name="Gizle"/>
<Item id="6131" name="Menü"/>
<Item id="6122" name="Menü çubuğunu gizle (Alt veya F10 tuşlarıyla göster/gizle)"/>
<Item id="6132" name="Sağdaki ▼ ✕ kısayolları menü çubuğundan gizle (Notepad++ yeniden başlatılmalıdır)"/>
<Item id="6125" name="Davranış"/>
<Item id="6126" name="Bak &amp;&amp; hisset"/>
</Tabbar>
<Item id="6123" name="Yerelleştir"/>
</Global>
<Scintillas title="Düzenleme 1">
<Item id="6216" name="İmleç Ayarları"/>
<Item id="6217" name="Genişlik:"/>
@ -994,6 +1019,7 @@
<Item id="6239" name="Seçimin dışında sağ tıklanırsa seçimi koru"/>
<Item id="6245" name="Sanal Alanı Etkinleştir"/>
<Item id="6214" name="Satırı Seçmeden Kopyalamayı/Kesmeyi Etkinleştir"/>
<Item id="6225" name="Seçilmiş yazının arkaplanına özel rengi uygula"/>
<Item id="6651" name="Şimdiki Satır İşaretçisi"/>
<Item id="6652" name="Hiçbiri"/>
<Item id="6653" name="Arka Planı Vurgula"/>
@ -1030,10 +1056,10 @@
<Item id="7108" name="Açık Mavi"/>
<Item id="7109" name="Zeytin Yeşili"/>
<Item id="7115" name="Kişisel"/>
<Item id="7116" name="Üst"/>
<Item id="7117" name="Menü Odağı"/>
<Item id="7118" name="Etkin"/>
<Item id="7119" name="Temel"/>
<Item id="7116" name="İçerik Arkaplanı"/>
<Item id="7117" name="Odak Öğesi"/>
<Item id="7118" name="Kontrol Arkaplanı"/>
<Item id="7119" name="İletişim Arkaplanı"/>
<Item id="7120" name="Hata"/>
<Item id="7121" name="Yazı"/>
<Item id="7122" name="Koyu Yazı"/>
@ -1086,6 +1112,7 @@
<Item id="6419" name="Yeni Belge"/>
<Item id="6420" name="Açılmış ANSI dosyalarına uygula"/>
<Item id="6432" name="Başlangıçta her zaman yeni bir belge aç"/>
<Item id="6433" name="Belgenin ilk satırını adlandırılmamış sekme ismi olarak kullan"/>
</NewDoc>
<DefaultDir title="Varsayılan Dizin">
@ -1190,6 +1217,7 @@
<Item id="6908" name="Bul Alanını Seçili Yazı ile Doldur"/>
<Item id="6909" name="Hiçbir Şey Seçilmediyse İşaretçi Altındaki sözcüğü Seç"/>
<Item id="6910" name="&quot;Seçimde&quot; oto-kontrol için en az boyut:"/>
<Item id="6913" name="Aktif Belgeye Dayanarak Dosya Dizininde Bul Seçeneğini Doldur"/>
</Searching>
<RecentFilesHistory title="Son Kull. Dosya Geçmişi">
@ -1321,12 +1349,25 @@
<Element name="Kapat"/>
<Element name="Küçült / Kapat"/>
</ComboBox>
<ComboBox id="6362">
<Element name="GDI (En Uyumlu)"/>
<Element name="DirectWrite (Varsayılan)"/>
<Element name="DirectWrite (Çerçeveleri Koru)"/>
<Element name="DirectWrite (GDI DC Üzerine Çiz)"/>
<Element name="DirectWrite (DirectX 11)"/>
</ComboBox>
<ComboBox id="6364">
<Element name="Etkisizleştir"/>
<Element name="Notepad++ başlangıcında etkinleştir"/>
<Element name="Notepad++ kapatışında etkinleştir"/>
</ComboBox>
<Item id="6308" name="Görev Çubuğu"/>
<Item id="6363" name="Görselleştirme Modu"/>
<Item id="6365" name="Oto-Güncelleyici:"/>
<Item id="6312" name="Dosya Durumunu Otomatik Algıla"/>
<Item id="6313" name="Sessiz güncelle"/>
<Item id="6325" name="Güncellemeden sonra son satıra kaydır"/>
<Item id="6322" name="Oturumun dosya uzantısı:"/>
<Item id="6323" name="Notepad++'ı otomatik güncelle"/>
<Item id="6324" name="Belge Değiştirici (Ctrl + Tab)"/>
<Item id="6331" name="Başlık çubuğunda sadece dosya adını göster"/>
<Item id="6334" name="Karakter kodlamasını otomatik olarak algıla"/>
@ -1441,6 +1482,9 @@ Buluta yedekleme iptal edilecektir. Lütfen Tercihler'den tutarlı bir konum aya
<DroppingFolderAsProjectModeWarning title="Geçersiz İşlem" message="Sadece klasör ya da dosyaları bırakabilirsiniz fakat ikisini birden yapamazsınız, çünkü Klasörü Proje modu olarak bırakıyorsunuz.
Bu işlemin çalışması için, klasör bırakmada, klasörü Çalışma alanı olarak başlatmak yerine &quot; Ayarlar içindeki&quot; &quot;Varsayılan Dizin&quot; bölümünde &quot;Klasördeki tüm dosyaları&quot; seçeneği etkinleştirmelisiniz."/>
<SortingError title="Sıralama Hatası" message="$INT_REPLACE$ satırındaki hatadan dolayı Numerik sıralanamadı."/>
<SortLocaleMultiple title="Sıralama Gerçekleşmedi" message="Çoklu seçin desteklenmiyor."/><!-- NasılTekrarlanır: Çoklu seçim yapın ve Düzen | Satır İşlemleri | Satırları Yerel Düzende Sırala'yı seçin. -->
<SortLocaleUnknown title="Sıralama Başarısız" message="Sıralamanın başarısız olma sebebi belirlenemiyor."/><!-- NasılTekrarlanır: Bu durum teoriktir; neyin buna neden olacağı bilinmiyor. -->
<SortLocaleExcept title="Sıralama Başarısız" message="$STR_REPLACE$"/><!-- NasılTekrarlanır: 32-bit Notepad++ içinde büyük bir dosya açın, mesela 500MB / 90bin satırlı ve Düzen | Satır İşlemleri | Satırları Yerel Düzende Sırala'yı seçin. -->
<ColumnModeTip title="Sütun Modu İpucu" message="
Sütun seçme moduna geçmek için 3 yol var:
@ -1506,8 +1550,13 @@ Devam etmek istiyor musunuz?"/>
<UDLNewNameError title="UDL Hatası" message="Bu ad başka bir dil tarafından kullanılıyor,
lütfen yeni bir ad verin."/>
<UDLRemoveCurrentLang title="Şu Anki Dili Kaldır" message="Emin misiniz?"/>
<UDL_importSuccessful title="Kullanıcı Tanımlı Dil" message="İçeri alım başarılı."/>
<UDL_importFails title="Kullanıcı Tanımlı Dil" message="İçeri alım başarısız."/>
<UDL_saveBeforeImport title="Kullanıcı Tanımlı Dil" message="Dışa aktarma öncesinde, dil tanımınızı &quot;Farklı Kaydet...&quot; seçeneğine tıklayarak kaydedin."/> <!-- NasılTekrarlanır: Kullanıcı Dili penceresinde "Kullanıcı Tanımlı Dil" seçin, sonrasında "Dışa Ver..." dümesine basın. -->
<UDL_exportSuccessful title="Kullanıcı Tanımlı Dil" message="Dışa aktarma başarılı."/>
<UDL_exportFails title="Kullanıcı Tanımlı Dil" message="Dışa aktarma başarısız."/>
<SCMapperDoDeleteOrNot title="Emin misiniz?" message="Bu kısayolu silmek istediğinize emin misiniz?"/>
<FindCharRangeValueError title="Aralık Değeri Problemi" message="0 ile 255 arasında bir giriş yapmalısınız."/>
<FindCharRangeValueError title="Aralık Değeri Problemi" message="0 ile 255 arasında bir giriş yapmalısınız."/> <!-- NasılTekrarlanır: Ara menüsü, Aralıktaki karakterleri bul, Özel Aralık seçin, herhangi bir düzenle kutusunda 999 girin, ve Ara'ya basın. -->
<OpenInAdminMode title="Kayıt Başarısız" message="Dosya kaydedilemedi, korumalı olabilir.
Notepad++ı Yönetici olarak başlatmak ister misiniz?"/>
<OpenInAdminModeWithoutCloseCurrent title="Kayıt Başarısız" message="Dosya kaydedilemedi, korumalı olabilir.
@ -1548,6 +1597,10 @@ Bul penceresini açmak için Tamam tuşuna basın veya ona odaklayın.
Eğer geriye doğru düzenli ifade arama özelliğine ihtiyacınız varsa, kullanıcı kılavuzundaki talimatlarla etkinleştirin."/>
<PrintError title="0" message="Yazıcı belgesi başlatılamıyor."/><!-- title="0" kullanarak Windows İS varsayılan "Hata" tercüme başlığını kullanabilirsiniz. -->
<FindAutoChangeOfInSelectionWarning title="Arama Uyarısı" message="&quot;Seçimde&quot; kutucuk değeri otomatik olarak değiştirildi.
Bu eylemi gerçekleştirmeden önce lütfen arama durumunu doğrulayın."/> <!-- NasılTekrarlanır: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14897#issuecomment-2564316224 -->
<Need2Restart2ShowMenuShortcuts title="Notepad++ Yeniden Başlatılmalı" message="Doğru menü kısayollarının gösterimi için Notepad++ yeniden başlatılmalı."/>
<NoAdminRight2ChangeReadOnlyFileAttribute title="Dosyanın Salt Okunur Özniteliği Değişimi Başarısız" message="Dosya niteliklerinin değişmesi için lütfen Notepad++'ı yönetici olarak çalıştırın."/>
</MessageBox>
<ClipboardHistory>
<PanelTitle name="Pano Geçmişi"/>
@ -1683,6 +1736,7 @@ Eğer geriye doğru düzenli ifade arama özelliğine ihtiyacınız varsa, kulla
Tüm dosyalarda bul ama şu klasörleri tekrarlı olarak hariç tut - log ya da logs:
*.* !+\log*"/><!-- NasılTekrarlanır: Bul penceresinde Farenin ucu "Dosyalarda Bul" sekmesi içinde "Filtreler" etiketi üzerinde tutulur. -->
<find-in-files-select-folder value="İçinde arama yapılacak bir klasör seçin"/><!-- NasılTekrarlanır: Bul > Dosyalarda Bul > [...] -->
<find-in-files-dir-from-active-doc-tip value="Dizin alanını aktif belgeye dayanarak doldur"/><!-- NasılTekrarlanır: Ara > Dosyalarda Bul > [<<] -->
<find-status-top-reached value="Bulma: Dosyanın başına ulaşıldı, sondan birinci eşleşme bulundu."/>
<find-status-end-reached value="Bulma: Dosyanın sonuna ulaşıldı, baştan birinci eşleşme bulundu."/>
<find-status-replaceinfiles-1-replaced value="Dosyalarda Değiştir: 1 eşleşme değiştirildi"/>
@ -1819,6 +1873,19 @@ C, C++, Java, C#, Objective-C, PHP, JavaScript, JSP, CSS, Perl, Rust, PowerShell
Eğer gelişmiş modu seçerseniz fakat belirtilen dilleri düzenlemezseniz, girinti basit modda kalacaktır."/>
<!-- "Global override" ve "Default Style" kelimelerini değiştirme -->
<global-override-tip value="Burada &quot;Global override&quot; etkinleştirmek tüm dil stillerindeki parametreyi değiştirecektir. Yapmak istediğiniz ise, muhtemelen ayarlardaki &quot;Default Style&quot; seçeneğini kullanmak"/>
<scintillaRenderingTechnology-tip value="Özel karakterlerin gösterimini iyileştirebilir veya bazı grafik sorunlarını çözebilir, değişimleri onaylamak için Notepad++'ı yeniden başlatın."/>
<!-- Durum çubuğundaki kısıtlı alandan dolayı, eğer 'length' & 'lines' çevirileri İngilizce kelimelerden çok daha uzunsa, çevirmek yerine lütfen onları İngilizce bırakın. -->
<statusbar-length-lines value="mesafe: $STR_REPLACE1$ strlr: $STR_REPLACE2$"/>
<!-- Durum çubuğundaki kısıtlı alandan dolayı, eğer 'Ln' & 'Col' çevirileri İngilizce kelimelerden uzunsa, çevirmek yerine lütfen onları İngilizce bırakın. -->
<statusbar-Ln-Col value="St: $STR_REPLACE1$ Stn: $STR_REPLACE2$"/>
<!-- Durum çubuğundaki kısıtlı alandan dolayı, eğer 'Pos' & 'Sel' çevirileri İngilizce kelimelerden uzunsa, çevirmek yerine lütfen onları İngilizce bırakın. -->
<statusbar-Pos value="Poz: "/>
<statusbar-Sel value="Seç: "/>
<statusbar-Sel-number value="Seç"/>
<toolbar-accent-tip value="Bu seçenek, araç çubuğu simgelerinizin Windows sistem tema rengini izlemesini sağlar. Tema rengi, Windows üzerindeki düğmelerde, çerçevelerde ve Başlat menüsü desenlerinde vurgulamak için kullanılır. Değiştirmek için, Ayarlar &gt; Kişiselleştirme &gt; Renklere gidin, sonrasında tercih ettiğiniz tema rengini seçin."/>
</MiscStrings>
</Native-Langue>
</NotepadPlus>

View File

@ -17,12 +17,21 @@
Var installPath
Var doLocalConf
Var keepUserData
Function un.onInit
!ifdef ARCH64 || ARCHARM64 ; x64 or ARM64 : installation of 64 bits Notepad++ & its 64 bits components
StrCpy $winSysDir "$WINDIR\System32"
!else ; installation of 32 bits Notepad++ & its 32 bits components
StrCpy $winSysDir "$WINDIR\SysWOW64"
!endif
StrCpy $keepUserData "false" ; default value(It is must, otherwise few files such as shortcuts.xml, contextMenu.xml etc, will not be removed when $INSTDIR\doLocalConf.xml is not available.)
; determinate theme path for uninstall themes
StrCpy $installPath "$APPDATA\${APPNAME}"
StrCpy $doLocalConf "false"
IfFileExists $INSTDIR\doLocalConf.xml doesExist noneExist
doesExist:
StrCpy $installPath $INSTDIR
StrCpy $doLocalConf "true"

View File

@ -1,6 +1,6 @@
echo off
rem This file is part of Notepad++ project
rem Copyright (C)2021 Don HO <don.h@free.fr>
rem Copyright (C)2025 Don HO <don.h@free.fr>
rem
rem This program is free software: you can redistribute it and/or modify
rem it under the terms of the GNU General Public License as published by
@ -22,6 +22,10 @@ if %SIGN% == 0 goto NoSign
set signtoolWin11="C:\Program Files (x86)\Windows Kits\10\bin\10.0.22621.0\x64\signtool.exe"
set signBinary=%signtoolWin11% sign /fd SHA512 /tr http://timestamp.acs.microsoft.com /td sha512 /a /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/
REM macro is used to sign NppShell.dll & NppShell.msix with hash algorithm SHA256, due to signtool.exe bug:
REM https://learn.microsoft.com/en-us/windows/msix/package/signing-known-issues
set signBinarySha256=%signtoolWin11% sign /fd SHA256 /tr http://timestamp.acs.microsoft.com /td sha512 /a /f %NPP_CERT% /p %NPP_CERT_PWD% /d "Notepad++" /du https://notepad-plus-plus.org/
%signBinary% ..\bin\notepad++.exe
If ErrorLevel 1 goto End
@ -30,16 +34,18 @@ If ErrorLevel 1 goto End
%signBinary% ..\binarm64\notepad++.exe
If ErrorLevel 1 goto End
%signBinary% ..\bin\NppShell.x86.dll
If ErrorLevel 1 goto End
rem %signBinary% ..\bin64\NppShell.msix
If ErrorLevel 1 goto End
%signBinary% ..\bin64\NppShell.x64.dll
If ErrorLevel 1 goto End
rem %signBinary% ..\binarm64\NppShell.msix
If ErrorLevel 1 goto End
%signBinary% ..\binarm64\NppShell.arm64.dll
If ErrorLevel 1 goto End
REM %signBinarySha256% ..\bin\NppShell.x86.dll
REM If ErrorLevel 1 goto End
REM
REM %signBinarySha256% ..\bin64\NppShell.msix
REM If ErrorLevel 1 goto End
REM %signBinarySha256% ..\bin64\NppShell.x64.dll
REM If ErrorLevel 1 goto End
REM
REM %signBinarySha256% ..\binarm64\NppShell.msix
REM If ErrorLevel 1 goto End
REM %signBinarySha256% ..\binarm64\NppShell.arm64.dll
REM If ErrorLevel 1 goto End
%signBinary% ..\bin\plugins\Config\nppPluginList.dll
If ErrorLevel 1 goto End

View File

@ -1053,7 +1053,7 @@ Credits:
<WidgetStyle name="Caret colour" styleID="2069" fgColor="37A8ED" />
<WidgetStyle name="Multi-edit carets color" styleID="0" fgColor="37A8ED" />
<WidgetStyle name="Edge colour" styleID="0" fgColor="EEEEEC" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="E5C138" bgColor="4C4A41" fontName="" fontStyle="0" fontSize="8" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="E5C138" bgColor="4C4A41" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="4C4A41" />
<WidgetStyle name="Change History margin" styleID="0" bgColor="4C4A41" />
<WidgetStyle name="Change History modified" styleID="0" fgColor="FF8000" bgColor="FF8000" />
@ -1094,6 +1094,6 @@ Credits:
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="BDAE9D" bgColor="2A211C" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="BDAE9D" bgColor="2A211C" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="BDAE9D" bgColor="2A211C" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1043,7 +1043,7 @@ Credits:
<WidgetStyle name="Caret colour" styleID="2069" fgColor="FFFFFF" />
<WidgetStyle name="Multi-edit carets color" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Edge colour" styleID="0" fgColor="EEEEEC" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="8" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History modified" styleID="0" fgColor="FF8000" bgColor="FF8000" />
@ -1084,6 +1084,6 @@ Credits:
<WidgetStyle name="URL hovered" styleID="0" fgColor="BDAE9D" />
<WidgetStyle name="Document map" styleID="0" fgColor="F8F8F8" bgColor="0C1021" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="F8F8F8" bgColor="0C1021" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="F8F8F8" bgColor="0C1021" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1043,7 +1043,7 @@ Credits:
<WidgetStyle name="Caret colour" styleID="2069" fgColor="A7A7A7" />
<WidgetStyle name="Multi-edit carets color" styleID="0" fgColor="A7A7A7" />
<WidgetStyle name="Edge colour" styleID="0" fgColor="EEEEEC" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="8" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History modified" styleID="0" fgColor="FF8000" bgColor="FF8000" />
@ -1084,6 +1084,6 @@ Credits:
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="C3BE98" bgColor="1A0F0B" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="C3BE98" bgColor="1A0F0B" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="C3BE98" bgColor="1A0F0B" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1162,7 +1162,7 @@ Installation : Copy this file to "%APPDATA%\Notepad++\themes" and in a portable
<WidgetStyle name="Caret colour" styleID="2069" fgColor="A7A7A7" />
<WidgetStyle name="Multi-edit carets color" styleID="0" fgColor="A7A7A7" />
<WidgetStyle name="Edge colour" styleID="0" fgColor="EEEEEC" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="8F8F8F" bgColor="363636" fontName="" fontStyle="0" fontSize="9" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="8F8F8F" bgColor="363636" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="363636" />
<WidgetStyle name="Change History margin" styleID="0" bgColor="363636" />
<WidgetStyle name="Change History modified" styleID="0" fgColor="FF8000" bgColor="FF8000" />
@ -1203,6 +1203,6 @@ Installation : Copy this file to "%APPDATA%\Notepad++\themes" and in a portable
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="C7C7C7" bgColor="2E2E2E" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="C7C7C7" bgColor="2E2E2E" fontName="Source Code Pro" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="C7C7C7" bgColor="2E2E2E" fontName="Source Code Pro" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1822,6 +1822,6 @@ License: GPL2
<WidgetStyle name="Document map" styleID="0" fgColor="000000" bgColor="FFFFFF" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Non-printing characters custom color" styleID="0" fgColor="5F5F5F" />
<WidgetStyle name="Global override" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="Consolas" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="Consolas" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1038,7 +1038,7 @@ https://notepad-plus-plus.org/donate/
</LexerStyles>
<GlobalStyles>
<!-- Attention : Don't modify the name of styleID="0" -->
<WidgetStyle name="Default Style" styleID="32" fgColor="FFFFFF" bgColor="000000" fontName="Courier New" fontStyle="0" fontSize="9" />
<WidgetStyle name="Default Style" styleID="32" fgColor="FFFFFF" bgColor="000000" fontName="Courier New" fontStyle="0" fontSize="10" />
<WidgetStyle name="Indent guideline style" styleID="37" fgColor="C0C0C0" bgColor="000000" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Brace highlight style" styleID="34" fgColor="00FF00" bgColor="000000" fontName="" fontStyle="1" fontSize="" />
<WidgetStyle name="Bad brace colour" styleID="35" fgColor="FF0000" bgColor="000000" fontName="" fontStyle="1" fontSize="" />
@ -1091,6 +1091,6 @@ https://notepad-plus-plus.org/donate/
<WidgetStyle name="Document map" styleID="0" fgColor="FF8000" bgColor="FFFFFF" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Non-printing characters custom color" styleID="0" fgColor="FF8080" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFFFF" bgColor="000000" fontName="Courier New" fontStyle="0" fontSize="9" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFFFF" bgColor="000000" fontName="Courier New" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1062,6 +1062,6 @@ so your enhanced file can be included in Notepad++ future release.
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="000000" bgColor="FFB0FF" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFF80" bgColor="FFB0FF" fontName="Courier New" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFF80" bgColor="FFB0FF" fontName="Courier New" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1219,6 +1219,6 @@ Installation:
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="B7975D" bgColor="2B0F01" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="B7975D" bgColor="2B0F01" fontName="Consolas" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="B7975D" bgColor="2B0F01" fontName="Consolas" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1048,7 +1048,7 @@ Credits:
<WidgetStyle name="Caret colour" styleID="2069" fgColor="FFFFFF" />
<WidgetStyle name="Multi-edit carets color" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Edge colour" styleID="0" fgColor="EEEEEC" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="8" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History modified" styleID="0" fgColor="FF8000" bgColor="FF8000" />
@ -1089,6 +1089,6 @@ Credits:
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="FFFFFF" bgColor="222C28" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFFFF" bgColor="222C28" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFFFF" bgColor="222C28" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1064,7 +1064,7 @@ Credits:
<WidgetStyle name="Caret colour" styleID="2069" fgColor="F8F8F0" />
<WidgetStyle name="Multi-edit carets color" styleID="0" fgColor="F8F8F0" />
<WidgetStyle name="Edge colour" styleID="0" fgColor="EEEEEC" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="8" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History modified" styleID="0" fgColor="FF8000" bgColor="FF8000" />
@ -1105,6 +1105,6 @@ Credits:
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="F8F8F2" bgColor="272822" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="F8F8F2" bgColor="272822" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="F8F8F2" bgColor="272822" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1219,6 +1219,6 @@ Installation:
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="F2C476" bgColor="58693D" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="F2C476" bgColor="58693D" fontName="Consolas" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="F2C476" bgColor="58693D" fontName="Consolas" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1216,6 +1216,6 @@ Installation:
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="000000" bgColor="BA9C80" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="000000" bgColor="BA9C80" fontName="Consolas" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="000000" bgColor="BA9C80" fontName="Consolas" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1121,6 +1121,6 @@ Notepad++ Custom Style
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="E0E2E4" bgColor="293134" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="E0E2E4" bgColor="293134" fontName="Courier New" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="E0E2E4" bgColor="293134" fontName="Courier New" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1060,7 +1060,7 @@ Credits:
<WidgetStyle name="Caret colour" styleID="2069" fgColor="8BA7A7" />
<WidgetStyle name="Multi-edit carets color" styleID="0" fgColor="8BA7A7" />
<WidgetStyle name="Edge colour" styleID="0" fgColor="EEEEEC" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="8" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History modified" styleID="0" fgColor="FF8000" bgColor="FF8000" />
@ -1101,6 +1101,6 @@ Credits:
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="F8F8F8" bgColor="0B161D" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="F8F8F8" bgColor="0B161D" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="F8F8F8" bgColor="0B161D" fontName="DejaVu Sans Mono" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -899,7 +899,7 @@ http://sourceforge.net/donate/index.php?group_id=95717
<WidgetStyle name="Caret colour" styleID="2069" fgColor="FFFFFF" />
<WidgetStyle name="Multi-edit carets color" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Edge colour" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="FFFFFF" bgColor="1F4661" fontName="" fontStyle="0" fontSize="8" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="FFFFFF" bgColor="1F4661" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="1F4661" />
<WidgetStyle name="Change History margin" styleID="0" bgColor="1F4661" />
<WidgetStyle name="Change History modified" styleID="0" fgColor="FF8000" bgColor="FF8000" />
@ -940,6 +940,6 @@ http://sourceforge.net/donate/index.php?group_id=95717
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="FFFFFF" bgColor="112435" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFF80" bgColor="FF8000" fontName="Courier New" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFF80" bgColor="FF8000" fontName="Courier New" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1227,6 +1227,6 @@ Installation:
<WidgetStyle name="URL hovered" styleID="0" fgColor="808040" />
<WidgetStyle name="Document map" styleID="0" fgColor="657B83" bgColor="FDF6E3" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="657B83" bgColor="FDF6E3" fontName="Consolas" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="657B83" bgColor="FDF6E3" fontName="Consolas" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1619,6 +1619,6 @@ Installation:
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="839496" bgColor="002B36" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="839496" bgColor="002B36" fontName="Consolas" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="839496" bgColor="002B36" fontName="Consolas" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1049,7 +1049,7 @@ Credits:
<WidgetStyle name="Caret colour" styleID="2069" fgColor="A7A7A7" />
<WidgetStyle name="Multi-edit carets color" styleID="0" fgColor="A7A7A7" />
<WidgetStyle name="Edge colour" styleID="0" fgColor="EEEEEC" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="8" />
<WidgetStyle name="Line number margin" styleID="33" fgColor="EEEEEC" bgColor="2E3436" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Bookmark margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History margin" styleID="0" bgColor="2E3436" />
<WidgetStyle name="Change History modified" styleID="0" fgColor="FF8000" bgColor="FF8000" />
@ -1090,6 +1090,6 @@ Credits:
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="F8F8F8" bgColor="141414" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="F8F8F8" bgColor="141414" fontName="Consolas" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="F8F8F8" bgColor="141414" fontName="Consolas" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1060,6 +1060,6 @@ http://sourceforge.net/donate/index.php?group_id=95717
<WidgetStyle name="URL hovered" styleID="0" fgColor="FFFFFF" />
<WidgetStyle name="Document map" styleID="0" fgColor="FFFFFF" bgColor="000000" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFF80" bgColor="FF8000" fontName="Courier New" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFF80" bgColor="FF8000" fontName="Courier New" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1789,6 +1789,6 @@ License: GPL2
<WidgetStyle name="URL hovered" styleID="0" fgColor="A3DCA3" />
<WidgetStyle name="Document map" styleID="0" fgColor="000000" bgColor="FFFFFF" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="Consolas" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="DCDCCC" bgColor="3F3F3F" fontName="Consolas" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1216,6 +1216,6 @@ Installation:
<WidgetStyle name="URL hovered" styleID="0" fgColor="808040" />
<WidgetStyle name="Document map" styleID="0" fgColor="5F5F00" bgColor="D7D7AF" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="808080" />
<WidgetStyle name="Global override" styleID="0" fgColor="5F5F00" bgColor="D7D7AF" fontName="Consolas" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="5F5F00" bgColor="D7D7AF" fontName="Consolas" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -1537,7 +1537,25 @@ bool toggleReadOnlyFlagFromFileAttributes(const wchar_t* fileFullPath, bool& isC
}
else
{
// probably the ERROR_ACCESS_DENIED (5) (TODO: UAC-prompt candidate)
if (::GetLastError() == ERROR_ACCESS_DENIED)
{
// try to set elevated
// (notepad++.exe #UAC-SETFILEATTRIBUTES# attrib_flags_number_str dest_file_path)
wstring strCmdLineParams = NPP_UAC_SETFILEATTRIBUTES_SIGN;
strCmdLineParams += L" \"" + to_wstring(dwFileAttribs) + L"\" \"";
strCmdLineParams += fileFullPath;
strCmdLineParams += L"\"";
DWORD dwNppUacOpError = invokeNppUacOp(strCmdLineParams);
if (dwNppUacOpError == NO_ERROR)
{
isChangedToReadOnly = (dwFileAttribs & FILE_ATTRIBUTE_READONLY) != 0;
return true;
}
else
{
::SetLastError(dwNppUacOpError); // set that as our current thread one for a possible reporting later
}
}
return false;
}
}
@ -2094,4 +2112,100 @@ bool isCoreWindows()
return isCoreWindows;
}
bool ControlInfoTip::init(HINSTANCE hInst, HWND ctrl2attached, HWND ctrl2attachedParent, const wstring& tipStr, bool isRTL, unsigned int remainTimeMillisecond /* = 0 */)
{
_hWndInfoTip = CreateWindowEx(isRTL ? WS_EX_LAYOUTRTL : 0, TOOLTIPS_CLASS, NULL,
WS_POPUP | TTS_ALWAYSTIP | TTS_BALLOON,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
ctrl2attachedParent, NULL,
hInst, NULL);
if (!_hWndInfoTip)
return false;
_toolInfo.cbSize = sizeof(_toolInfo);
_toolInfo.hwnd = ctrl2attachedParent;
_toolInfo.uFlags = TTF_IDISHWND | TTF_TRACK;
_toolInfo.uId = (UINT_PTR)ctrl2attached;
_toolInfo.lpszText = const_cast<PTSTR>(tipStr.c_str());
if (!SendMessage(_hWndInfoTip, TTM_ADDTOOL, 0, (LPARAM)&_toolInfo))
{
::DestroyWindow(_hWndInfoTip);
_hWndInfoTip = nullptr;
return false;
}
SendMessage(_hWndInfoTip, TTM_SETMAXTIPWIDTH, 0, 200);
SendMessage(_hWndInfoTip, TTM_ACTIVATE, TRUE, 0);
if (remainTimeMillisecond)
SetTimer(ctrl2attachedParent, IDT_HIDE_TOOLTIP, remainTimeMillisecond, NULL);
return true;
}
void ControlInfoTip::show() const
{
if (!isValid()) return;
RECT rcComboBox;
GetWindowRect(reinterpret_cast<HWND>(_toolInfo.uId), &rcComboBox);
int xPos = rcComboBox.left + (rcComboBox.right - rcComboBox.left) / 2;
int yPos = rcComboBox.top + 25;
SendMessage(_hWndInfoTip, TTM_TRACKPOSITION, 0, MAKELPARAM(xPos, yPos));
SendMessage(_hWndInfoTip, TTM_TRACKACTIVATE, (WPARAM)TRUE, (LPARAM)&_toolInfo);
}
void ControlInfoTip::hide()
{
if (_hWndInfoTip)
{
SendMessage(_hWndInfoTip, TTM_TRACKACTIVATE, (WPARAM)FALSE, (LPARAM)&_toolInfo);
DestroyWindow(_hWndInfoTip);
_hWndInfoTip = nullptr;
}
}
#pragma warning(default:4996)
DWORD invokeNppUacOp(std::wstring& strCmdLineParams)
{
if ((strCmdLineParams.length() == 0) || (strCmdLineParams.length() > (USHRT_MAX / sizeof(WCHAR))))
{
// no cmdline or it exceeds the current max WinOS 32767 WCHARs
return ERROR_INVALID_PARAMETER;
}
wchar_t wszNppFullPath[MAX_PATH]{};
::SetLastError(NO_ERROR);
if (!::GetModuleFileName(NULL, wszNppFullPath, MAX_PATH) || (::GetLastError() == ERROR_INSUFFICIENT_BUFFER))
{
return ::GetLastError();
}
SHELLEXECUTEINFOW sei{};
sei.cbSize = sizeof(SHELLEXECUTEINFOW);
sei.lpVerb = L"runas"; // UAC prompt
sei.nShow = SW_SHOWNORMAL;
sei.fMask = SEE_MASK_NOCLOSEPROCESS; // sei.hProcess member receives the launched process handle
sei.lpFile = wszNppFullPath;
sei.lpParameters = strCmdLineParams.c_str();
if (!::ShellExecuteExW(&sei))
return ::GetLastError();
// wait for the elevated Notepad++ process to finish
DWORD dwError = NO_ERROR;
if (sei.hProcess) // beware - do not check here for the INVALID_HANDLE_VALUE (valid GetCurrentProcess() pseudohandle)
{
::WaitForSingleObject(sei.hProcess, INFINITE);
::GetExitCodeProcess(sei.hProcess, &dwError);
::CloseHandle(sei.hProcess);
}
return dwError;
}

View File

@ -19,6 +19,7 @@
#include <string>
#include <sstream>
#include <windows.h>
#include <commctrl.h>
#include <iso646.h>
#include <cstdint>
#include <unordered_set>
@ -296,3 +297,43 @@ bool doesPathExist(const wchar_t* path, DWORD milliSec2wait = 0, bool* isTimeout
bool isWindowVisibleOnAnyMonitor(const RECT& rectWndIn);
bool isCoreWindows();
#define IDT_HIDE_TOOLTIP 1001
class ControlInfoTip final
{
public:
ControlInfoTip() {};
~ControlInfoTip() {
if (_hWndInfoTip) {
hide();
}
};
bool init(HINSTANCE hInst, HWND ctrl2attached, HWND ctrl2attachedParent, const std::wstring& tipStr, bool isRTL, unsigned int remainTimeMillisecond = 0); // remainTimeMillisecond = 0: no timeout
bool isValid() const {
return _hWndInfoTip != nullptr;
};
HWND getTipHandle() const {
return _hWndInfoTip;
};
void show() const;
void hide();
private:
HWND _hWndInfoTip = nullptr;
TOOLINFO _toolInfo = {};
ControlInfoTip(const ControlInfoTip&) = delete;
ControlInfoTip& operator=(const ControlInfoTip&) = delete;
};
#define NPP_UAC_SAVE_SIGN L"#UAC-SAVE#"
#define NPP_UAC_SETFILEATTRIBUTES_SIGN L"#UAC-SETFILEATTRIBUTES#"
#define NPP_UAC_MOVEFILE_SIGN L"#UAC-MOVEFILE#"
DWORD invokeNppUacOp(std::wstring& strCmdLineParams);

View File

@ -54,7 +54,10 @@ Win32_IO_File::Win32_IO_File(const wchar_t *fname)
{
bool isFromNetwork = PathIsNetworkPath(fname);
if (isFromNetwork && isTimeoutReached) // The file doesn't exist, and the file is a network file, plus the network problem has been detected due to timeout
return; // In this case, we don't call createFile to prevent hanging
{
_dwErrorCode = ERROR_FILE_NOT_FOUND; // store
return; // In this case, we don't call createFile to prevent hanging
}
}
_hFile = ::CreateFileW(fname, _accessParam, _shareParam, NULL, dispParam, _attribParam, NULL);
@ -68,6 +71,9 @@ Win32_IO_File::Win32_IO_File(const wchar_t *fname)
_hFile = ::CreateFileW(fname, _accessParam, _shareParam, NULL, dispParam, _attribParam, NULL);
}
if (_hFile == INVALID_HANDLE_VALUE)
_dwErrorCode = ::GetLastError(); // store
if (fileExists && (dispParam == CREATE_ALWAYS) && (_hFile != INVALID_HANDLE_VALUE))
{
// restore back the original creation date & attributes
@ -91,7 +97,7 @@ Win32_IO_File::Win32_IO_File(const wchar_t *fname)
else
{
msg += " failed to open, CreateFileW ErrorCode: ";
msg += std::to_string(::GetLastError());
msg += std::to_string(_dwErrorCode);
}
writeLog(nppIssueLog.c_str(), msg.c_str());
}
@ -100,11 +106,13 @@ Win32_IO_File::Win32_IO_File(const wchar_t *fname)
void Win32_IO_File::close()
{
_dwErrorCode = NO_ERROR; // reset
if (isOpened())
{
NppParameters& nppParam = NppParameters::getInstance();
DWORD flushError = NOERROR;
DWORD flushError = NO_ERROR;
if (_written)
{
if (!::FlushFileBuffers(_hFile))
@ -159,7 +167,14 @@ Please try using another storage and also check if your saved data is not corrup
}
}
}
::CloseHandle(_hFile);
_dwErrorCode = flushError; // store possible flushing error 1st
if (!::CloseHandle(_hFile))
{
if (!flushError)
_dwErrorCode = ::GetLastError(); // store
}
_hFile = INVALID_HANDLE_VALUE;
@ -194,6 +209,8 @@ Please try using another storage and also check if your saved data is not corrup
bool Win32_IO_File::write(const void *wbuf, size_t buf_size)
{
_dwErrorCode = NO_ERROR; // reset
if (!isOpened() || (wbuf == nullptr))
return false;
@ -203,6 +220,7 @@ bool Win32_IO_File::write(const void *wbuf, size_t buf_size)
size_t bytes_left_to_write = buf_size;
BOOL success = FALSE;
DWORD writeError = NO_ERROR; // use also a local var here to be 100% thread-safe
do
{
@ -219,6 +237,10 @@ bool Win32_IO_File::write(const void *wbuf, size_t buf_size)
bytes_left_to_write -= static_cast<size_t>(bytes_written);
total_bytes_written += static_cast<size_t>(bytes_written);
}
else
{
writeError = ::GetLastError();
}
} while (success && bytes_left_to_write);
NppParameters& nppParam = NppParameters::getInstance();
@ -234,11 +256,11 @@ bool Win32_IO_File::write(const void *wbuf, size_t buf_size)
std::string msg = _path;
msg += " written failed: ";
std::wstring lastErrorMsg = GetLastErrorAsString(::GetLastError());
std::wstring lastErrorMsg = GetLastErrorAsString(writeError);
msg += wstring2string(lastErrorMsg, CP_UTF8);
writeLog(nppIssueLog.c_str(), msg.c_str());
}
_dwErrorCode = writeError; // store
return false;
}
else

View File

@ -48,6 +48,10 @@ public:
return write(str.c_str(), str.length());
};
DWORD getLastErrorCode() {
return _dwErrorCode;
};
private:
HANDLE _hFile {INVALID_HANDLE_VALUE};
bool _written {false};
@ -56,4 +60,6 @@ private:
const DWORD _accessParam { GENERIC_READ | GENERIC_WRITE };
const DWORD _shareParam { FILE_SHARE_READ | FILE_SHARE_WRITE };
const DWORD _attribParam { FILE_ATTRIBUTE_NORMAL };
DWORD _dwErrorCode{ NO_ERROR };
};

View File

@ -26,7 +26,7 @@
enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\
L_HTML, L_XML, L_MAKEFILE, L_PASCAL, L_BATCH, L_INI, L_ASCII, L_USER,\
L_ASP, L_SQL, L_VB, L_JS, L_CSS, L_PERL, L_PYTHON, L_LUA, \
L_ASP, L_SQL, L_VB, L_JS_EMBEDDED, L_CSS, L_PERL, L_PYTHON, L_LUA, \
L_TEX, L_FORTRAN, L_BASH, L_FLASH, L_NSIS, L_TCL, L_LISP, L_SCHEME,\
L_ASM, L_DIFF, L_PROPS, L_PS, L_RUBY, L_SMALLTALK, L_VHDL, L_KIX, L_AU3,\
L_CAML, L_ADA, L_VERILOG, L_MATLAB, L_HASKELL, L_INNO, L_SEARCHRESULT,\
@ -39,7 +39,7 @@ enum LangType {L_TEXT, L_PHP , L_C, L_CPP, L_CS, L_OBJC, L_JAVA, L_RC,\
L_REGISTRY, L_RUST, L_SPICE, L_TXT2TAGS, L_VISUALPROLOG,\
L_TYPESCRIPT, L_JSON5, L_MSSQL, L_GDSCRIPT, L_HOLLYWOOD,\
L_GOLANG, L_RAKU, L_TOML, L_SAS, L_ERRORLIST, \
// Don't use L_JS, use L_JAVASCRIPT instead
// Don't use L_JS_EMBEDDED, use L_JAVASCRIPT instead
// The end of enumerated language type, so it should be always at the end
L_EXTERNAL};
enum class ExternalLexerAutoIndentMode { Standard, C_Like, Custom };

View File

@ -360,6 +360,7 @@ void HashFromTextDlg::generateHash()
break;
default:
delete[] text;
return;
}
@ -444,6 +445,7 @@ void HashFromTextDlg::generateHashPerLine()
break;
default:
delete[] text;
return;
}

View File

@ -201,7 +201,7 @@ void CSHA1::Final()
Transform(m_state, m_buffer);
#endif
}
/*
#ifdef SHA1_UTILITY_FUNCTIONS
bool CSHA1::ReportHash(wchar_t* tszReport, REPORT_TYPE rtReportType) const
{
@ -247,7 +247,7 @@ bool CSHA1::ReportHashStl(std::basic_string<wchar_t>& strOut, REPORT_TYPE rtRepo
return bResult;
}
#endif
*/
bool CSHA1::GetHash(UINT_8* pbDest20) const
{
if(pbDest20 == NULL) return false;

View File

@ -227,7 +227,7 @@ public:
// Finalize hash; call it before using ReportHash(Stl)
void Final();
/*
#ifdef SHA1_UTILITY_FUNCTIONS
bool ReportHash(wchar_t* tszReport, REPORT_TYPE rtReportType = REPORT_HEX) const;
#endif
@ -236,7 +236,7 @@ public:
bool ReportHashStl(std::basic_string<wchar_t>& strOut, REPORT_TYPE rtReportType =
REPORT_HEX) const;
#endif
*/
// Get the raw message digest (20 bytes)
bool GetHash(UINT_8* pbDest20) const;

View File

@ -3630,7 +3630,7 @@ void Notepad_plus::maintainIndentation(wchar_t ch)
// else nppGui._maintainIndent == autoIndent_advance
if (type == L_C || type == L_CPP || type == L_JAVA || type == L_CS || type == L_OBJC ||
type == L_PHP || type == L_JS || type == L_JAVASCRIPT || type == L_JSP || type == L_CSS || type == L_PERL ||
type == L_PHP || type == L_JS_EMBEDDED || type == L_JAVASCRIPT || type == L_JSP || type == L_CSS || type == L_PERL ||
type == L_RUST || type == L_POWERSHELL || type == L_JSON || type == L_JSON5 || type == L_TYPESCRIPT || type == L_GOLANG || type == L_SWIFT ||
autoIndentMode == ExternalLexerAutoIndentMode::C_Like)
{

View File

@ -1399,16 +1399,16 @@ BEGIN
EDITTEXT IDC_LICENCE_EDIT,30,93,210,117,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER
END
IDD_DEBUGINFOBOX DIALOGEX 0, 0, 246, 195
IDD_DEBUGINFOBOX DIALOGEX 0, 0, 300, 195
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Debug Info"
FONT 8, L"MS Shell Dlg", 0, 0, 0x1
BEGIN
GROUPBOX "",IDC_STATIC,8,3,230,151,BS_CENTER
EDITTEXT IDC_DEBUGINFO_EDIT,18,16,210,128,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
GROUPBOX "",IDC_STATIC,8,3,284,151,BS_CENTER
EDITTEXT IDC_DEBUGINFO_EDIT,18,16,264,128,ES_MULTILINE | ES_AUTOVSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
PUSHBUTTON "&Copy debug info to clipboard",IDC_DEBUGINFO_COPYLINK,8,157,126,14
DEFPUSHBUTTON "OK",IDOK,98,175,50,14
DEFPUSHBUTTON "OK",IDOK,125,175,50,14
END
IDD_DOSAVEORNOTBOX DIALOGEX 0, 0, 312, 80

View File

@ -159,7 +159,8 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const wchar_t *cmdL
if (cmdLineParams->_isNoTab)
{
// Restore old settings when tab bar has been hidden from tab bar.
nppGUI._tabStatus = tabStatusOld;
if (!(tabStatusOld & TAB_HIDE))
nppGUI._forceTabbarVisible = true;
}
}

View File

@ -511,9 +511,11 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
const NppGUI& nppGui = nppParam.getNppGUI();
if (nppGui._fillFindFieldWithSelected)
{
wchar_t str[strSize]{};
_pEditView->getGenericSelectedText(str, strSize, nppGui._fillFindFieldSelectCaret);
_findReplaceDlg.setSearchText(str);
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
_pEditView->getGenericSelectedText(str.get(), strSize, nppGui._fillFindFieldSelectCaret);
_findReplaceDlg.setSearchText(str.get());
}
if (isFirstTime)
@ -527,13 +529,14 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
case NPPM_INTERNAL_FINDINPROJECTS:
{
constexpr int strSize = FINDREPLACE_MAXLENGTH;
wchar_t str[strSize]{};
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
bool isFirstTime = not _findReplaceDlg.isCreated();
_findReplaceDlg.doDialog(FIND_DLG, _nativeLangSpeaker.isRTL());
_pEditView->getGenericSelectedText(str, strSize);
_findReplaceDlg.setSearchText(str);
_pEditView->getGenericSelectedText(str.get(), strSize);
_findReplaceDlg.setSearchText(str.get());
if (isFirstTime)
_nativeLangSpeaker.changeDlgLang(_findReplaceDlg.getHSelf(), "Find");
_findReplaceDlg.launchFindInProjectsDlg();
@ -544,15 +547,17 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
case NPPM_INTERNAL_FINDINFINDERDLG:
{
constexpr int strSize = FINDREPLACE_MAXLENGTH;
wchar_t str[strSize]{};
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
Finder *launcher = reinterpret_cast<Finder *>(wParam);
bool isFirstTime = !_findInFinderDlg.isCreated();
_findInFinderDlg.doDialog(launcher, _nativeLangSpeaker.isRTL());
_pEditView->getGenericSelectedText(str, strSize);
_findReplaceDlg.setSearchText(str);
_pEditView->getGenericSelectedText(str.get(), strSize);
_findReplaceDlg.setSearchText(str.get());
setFindReplaceFolderFilter(NULL, NULL);
if (isFirstTime)
@ -1013,41 +1018,49 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
case NPPM_GETCURRENTWORD:
case NPPM_GETCURRENTLINESTR:
{
const int strSize = CURRENTWORD_MAXLENGTH;
wchar_t str[strSize] = { '\0' };
const int strSize = CURRENTWORD_MAXLENGTH; // "If you are using the ShellExecute/Ex function, then you become subject to the INTERNET_MAX_URL_LENGTH (around 2048)
// command line length limit imposed by the ShellExecute/Ex functions."
// https://devblogs.microsoft.com/oldnewthing/20031210-00/?p=41553
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
wchar_t *pTchar = reinterpret_cast<wchar_t *>(lParam);
if (message == NPPM_GETCURRENTWORD)
_pEditView->getGenericSelectedText(str, strSize);
_pEditView->getGenericSelectedText(str.get(), strSize);
else if (message == NPPM_GETCURRENTLINESTR)
_pEditView->getLine(_pEditView->getCurrentLineNumber(), str, strSize);
_pEditView->getLine(_pEditView->getCurrentLineNumber(), str.get(), strSize);
// For the compatibility reason, if wParam is 0, then we assume the size of wstring buffer (lParam) is large enough.
// otherwise we check if the wstring buffer size is enough for the wstring to copy.
if (wParam != 0)
BOOL result = FALSE;
if (wParam == 0)
{
if (lstrlen(str) >= int(wParam)) //buffer too small
lstrcpy(pTchar, str.get()); // compatibility mode - don't check the size
result = TRUE;
}
else
{
if (lstrlen(str.get()) < int(wParam)) // buffer large enough, perform safe copy
{
return FALSE;
}
else //buffer large enough, perform safe copy
{
lstrcpyn(pTchar, str, static_cast<int32_t>(wParam));
return TRUE;
lstrcpyn(pTchar, str.get(), static_cast<int32_t>(wParam));
result = TRUE;
}
}
lstrcpy(pTchar, str);
return TRUE;
return result;
}
case NPPM_GETFILENAMEATCURSOR: // wParam = buffer length, lParam = (wchar_t*)buffer
{
constexpr int strSize = CURRENTWORD_MAXLENGTH;
wchar_t str[strSize]{};
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
int hasSlash = 0;
_pEditView->getGenericSelectedText(str, strSize); // this is either the selected text, or the word under the cursor if there is no selection
_pEditView->getGenericSelectedText(str.get(), strSize); // this is either the selected text, or the word under the cursor if there is no selection
hasSlash = FALSE;
for (int i = 0; str[i] != 0; i++)
if (CharacterIs(str[i], L"\\/"))
@ -1059,13 +1072,15 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
intptr_t start = 0;
intptr_t end = 0;
const wchar_t *delimiters;
wchar_t strLine[strSize]{};
auto strLine = std::make_unique<wchar_t[]>(strSize);
std::fill_n(strLine.get(), strSize, L'\0');
size_t lineNumber = 0;
intptr_t col = 0;
lineNumber = _pEditView->getCurrentLineNumber();
col = _pEditView->execute(SCI_GETCURRENTPOS) - _pEditView->execute(SCI_POSITIONFROMLINE, lineNumber);
_pEditView->getLine(lineNumber, strLine, strSize);
_pEditView->getLine(lineNumber, strLine.get(), strSize);
// find the start
start = col;
@ -1080,17 +1095,17 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
delimiters = L" \t:()[]<>\"\r\n";
while ((strLine[end] != 0) && (CharacterIs(strLine[end], delimiters) == FALSE)) end++;
lstrcpyn(str, &strLine[start], static_cast<int>(end - start + 1));
lstrcpyn(str.get(), &strLine[start], static_cast<int>(end - start + 1));
}
if (lstrlen(str) >= int(wParam)) //buffer too small
if (lstrlen(str.get()) >= int(wParam)) //buffer too small
{
return FALSE;
}
else //buffer large enough, perform safe copy
{
wchar_t* pTchar = reinterpret_cast<wchar_t*>(lParam);
lstrcpyn(pTchar, str, static_cast<int32_t>(wParam));
lstrcpyn(pTchar, str.get(), static_cast<int32_t>(wParam));
return TRUE;
}
}

View File

@ -146,10 +146,15 @@ void Notepad_plus::command(int id)
case IDM_FILE_CONTAININGFOLDERASWORKSPACE:
{
wchar_t currentFile[CURRENTWORD_MAXLENGTH] = { '\0' };
wchar_t currentDir[CURRENTWORD_MAXLENGTH] = { '\0' };
::SendMessage(_pPublicInterface->getHSelf(), NPPM_GETFULLCURRENTPATH, CURRENTWORD_MAXLENGTH, reinterpret_cast<LPARAM>(currentFile));
::SendMessage(_pPublicInterface->getHSelf(), NPPM_GETCURRENTDIRECTORY, CURRENTWORD_MAXLENGTH, reinterpret_cast<LPARAM>(currentDir));
const int strSize = CURRENTWORD_MAXLENGTH;
auto currentFile = std::make_unique<wchar_t[]>(strSize);
std::fill_n(currentFile.get(), strSize, L'\0');
auto currentDir = std::make_unique<wchar_t[]>(strSize);
std::fill_n(currentDir.get(), strSize, L'\0');
::SendMessage(_pPublicInterface->getHSelf(), NPPM_GETFULLCURRENTPATH, CURRENTWORD_MAXLENGTH, reinterpret_cast<LPARAM>(currentFile.get()));
::SendMessage(_pPublicInterface->getHSelf(), NPPM_GETCURRENTDIRECTORY, CURRENTWORD_MAXLENGTH, reinterpret_cast<LPARAM>(currentDir.get()));
if (!_pFileBrowser)
{
@ -157,9 +162,9 @@ void Notepad_plus::command(int id)
}
vector<wstring> folders;
folders.push_back(currentDir);
folders.push_back(currentDir.get());
launchFileBrowser(folders, currentFile);
launchFileBrowser(folders, currentFile.get());
}
break;
@ -430,8 +435,11 @@ void Notepad_plus::command(int id)
if (!textLen)
return;
char *pBinText = new char[textLen + 1];
_pEditView->getSelectedText(pBinText, textLen + 1);
const size_t strSize = textLen + 1;
auto pBinText = std::make_unique<char[]>(strSize);
std::fill_n(pBinText.get(), strSize, '\0');
_pEditView->getSelectedText(pBinText.get(), textLen + 1);
// Open the clipboard and empty it.
if (!::OpenClipboard(NULL))
@ -458,13 +466,13 @@ void Notepad_plus::command(int id)
::CloseClipboard();
return;
}
memcpy(lpucharCopy, pBinText, textLen * sizeof(unsigned char));
memcpy(lpucharCopy, pBinText.get(), textLen * sizeof(unsigned char));
lpucharCopy[textLen] = 0; // null character
delete[] pBinText;
::GlobalUnlock(hglbCopy);
pBinText.reset(nullptr); // free possible big membuf ASAP
// Place the handle on the clipboard.
if (!::SetClipboardData(CF_TEXT, hglbCopy))
{
@ -581,8 +589,12 @@ void Notepad_plus::command(int id)
return;
HWND hwnd = _pPublicInterface->getHSelf();
wchar_t currentWord[CURRENTWORD_MAXLENGTH] = { '\0' };
::SendMessage(hwnd, NPPM_GETFILENAMEATCURSOR, CURRENTWORD_MAXLENGTH, reinterpret_cast<LPARAM>(currentWord));
const int strSize = CURRENTWORD_MAXLENGTH;
auto currentWord = std::make_unique<wchar_t[]>(strSize);
std::fill_n(currentWord.get(), strSize, L'\0');
::SendMessage(hwnd, NPPM_GETFILENAMEATCURSOR, CURRENTWORD_MAXLENGTH, reinterpret_cast<LPARAM>(currentWord.get()));
wchar_t cmd2Exec[CURRENTWORD_MAXLENGTH] = { '\0' };
if (id == IDM_EDIT_OPENINFOLDER)
@ -595,27 +607,29 @@ void Notepad_plus::command(int id)
}
// Full file path: could be a folder or a file
if (doesPathExist(currentWord))
if (doesPathExist(currentWord.get()))
{
wstring fullFilePath = id == IDM_EDIT_OPENINFOLDER ? L"/select," : L"";
fullFilePath += L"\"";
fullFilePath += currentWord;
fullFilePath += currentWord.get();
fullFilePath += L"\"";
if (id == IDM_EDIT_OPENINFOLDER ||
(id == IDM_EDIT_OPENASFILE && !doesDirectoryExist(currentWord)))
(id == IDM_EDIT_OPENASFILE && !doesDirectoryExist(currentWord.get())))
::ShellExecute(hwnd, L"open", cmd2Exec, fullFilePath.c_str(), L".", SW_SHOW);
}
else // Relative file path - need concatenate with current full file path
{
wchar_t currentDir[CURRENTWORD_MAXLENGTH] = { '\0' };
::SendMessage(hwnd, NPPM_GETCURRENTDIRECTORY, CURRENTWORD_MAXLENGTH, reinterpret_cast<LPARAM>(currentDir));
auto currentDir = std::make_unique<wchar_t[]>(strSize);
std::fill_n(currentDir.get(), strSize, L'\0');
::SendMessage(hwnd, NPPM_GETCURRENTDIRECTORY, CURRENTWORD_MAXLENGTH, reinterpret_cast<LPARAM>(currentDir.get()));
wstring fullFilePath = id == IDM_EDIT_OPENINFOLDER ? L"/select," : L"";
fullFilePath += L"\"";
fullFilePath += currentDir;
fullFilePath += currentDir.get();
fullFilePath += L"\\";
fullFilePath += currentWord;
fullFilePath += currentWord.get();
if ((id == IDM_EDIT_OPENASFILE &&
(!doesFileExist(fullFilePath.c_str() + 1)))) // + 1 for skipping the 1st char '"'
@ -1343,12 +1357,13 @@ void Notepad_plus::command(int id)
case IDM_SEARCH_MARK :
{
const int strSize = FINDREPLACE_MAXLENGTH;
wchar_t str[strSize] = { '\0' };
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
const NppGUI& nppGui = (NppParameters::getInstance()).getNppGUI();
if (nppGui._fillFindFieldWithSelected)
{
_pEditView->getGenericSelectedText(str, strSize, nppGui._fillFindFieldSelectCaret);
_pEditView->getGenericSelectedText(str.get(), strSize, nppGui._fillFindFieldSelectCaret);
}
bool isFirstTime = !_findReplaceDlg.isCreated();
@ -1362,9 +1377,9 @@ void Notepad_plus::command(int id)
if (nppGui._fillFindFieldWithSelected)
{
if (lstrlen(str) <= FINDREPLACE_INSELECTION_THRESHOLD_DEFAULT)
if (lstrlen(str.get()) <= FINDREPLACE_INSELECTION_THRESHOLD_DEFAULT)
{
_findReplaceDlg.setSearchText(str);
_findReplaceDlg.setSearchText(str.get());
}
}
@ -1384,7 +1399,8 @@ void Notepad_plus::command(int id)
case IDM_SEARCH_FINDINCREMENT :
{
const int strSize = FINDREPLACE_MAXLENGTH;
wchar_t str[strSize] = { '\0' };
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
static bool isFirstTime = true;
if (isFirstTime)
@ -1393,9 +1409,9 @@ void Notepad_plus::command(int id)
isFirstTime = false;
}
_pEditView->getGenericSelectedText(str, strSize, false);
_pEditView->getGenericSelectedText(str.get(), strSize, false);
if (0 != str[0]) // the selected text is not empty, then use it
_incrementFindDlg.setSearchText(str, _pEditView->getCurrentBuffer()->getUnicodeMode() != uni8Bit);
_incrementFindDlg.setSearchText(str.get(), _pEditView->getCurrentBuffer()->getUnicodeMode() != uni8Bit);
_incrementFindDlg.display();
}
@ -1444,10 +1460,12 @@ void Notepad_plus::command(int id)
_findReplaceDlg.doDialog(FIND_DLG, _nativeLangSpeaker.isRTL(), false);
const int strSize = FINDREPLACE_MAXLENGTH;
wchar_t str[strSize] = { '\0' };
_pEditView->getGenericSelectedText(str, strSize);
_findReplaceDlg.setSearchText(str);
_findReplaceDlg._env->_str2Search = str;
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
_pEditView->getGenericSelectedText(str.get(), strSize);
_findReplaceDlg.setSearchText(str.get());
_findReplaceDlg._env->_str2Search = str.get();
setFindReplaceFolderFilter(NULL, NULL);
if (isFirstTime)
_nativeLangSpeaker.changeFindReplaceDlgLang(_findReplaceDlg);
@ -1457,7 +1475,7 @@ void Notepad_plus::command(int id)
op._whichDirection = (id == IDM_SEARCH_SETANDFINDNEXT?DIR_DOWN:DIR_UP);
FindStatus status = FSNoMessage;
_findReplaceDlg.processFindNext(str, &op, &status);
_findReplaceDlg.processFindNext(str.get(), &op, &status);
if (status == FSEndReached)
{
wstring msg = _nativeLangSpeaker.getLocalizedStrFromID("find-status-end-reached", FIND_STATUS_END_REACHED_TEXT);
@ -1497,8 +1515,9 @@ void Notepad_plus::command(int id)
case IDM_SEARCH_VOLATILE_FINDPREV :
{
const int strSize = FINDREPLACE_MAXLENGTH;
wchar_t str[strSize] = { '\0' };
_pEditView->getGenericSelectedText(str, strSize);
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
_pEditView->getGenericSelectedText(str.get(), strSize);
FindOption op;
op._isMatchCase = false;
@ -1508,7 +1527,7 @@ void Notepad_plus::command(int id)
op._whichDirection = (id == IDM_SEARCH_VOLATILE_FINDNEXT ? DIR_DOWN : DIR_UP);
FindStatus status = FSNoMessage;
_findReplaceDlg.processFindNext(str, &op, &status);
_findReplaceDlg.processFindNext(str.get(), &op, &status);
if (status == FSEndReached)
{
wstring msg = _nativeLangSpeaker.getLocalizedStrFromID("find-status-end-reached", FIND_STATUS_END_REACHED_TEXT);
@ -1541,22 +1560,25 @@ void Notepad_plus::command(int id)
styleID = SCE_UNIVERSAL_FOUND_STYLE_EXT5;
const int strSize = FINDREPLACE_MAXLENGTH;
wchar_t selectedText[strSize] = { '\0' };
wchar_t wordOnCaret[strSize] = { '\0' };
auto selectedText = std::make_unique<wchar_t[]>(strSize);
std::fill_n(selectedText.get(), strSize, L'\0');
_pEditView->getGenericSelectedText(selectedText, strSize, false);
_pEditView->getGenericWordOnCaretPos(wordOnCaret, strSize);
auto wordOnCaret = std::make_unique<wchar_t[]>(strSize);
std::fill_n(wordOnCaret.get(), strSize, L'\0');
_pEditView->getGenericSelectedText(selectedText.get(), strSize, false);
_pEditView->getGenericWordOnCaretPos(wordOnCaret.get(), strSize);
if (selectedText[0] == '\0')
{
if (lstrlen(wordOnCaret) > 0)
if (lstrlen(wordOnCaret.get()) > 0)
{
_findReplaceDlg.markAll(wordOnCaret, styleID);
_findReplaceDlg.markAll(wordOnCaret.get(), styleID);
}
}
else
{
_findReplaceDlg.markAll(selectedText, styleID);
_findReplaceDlg.markAll(selectedText.get(), styleID);
}
}
break;
@ -3457,6 +3479,7 @@ void Notepad_plus::command(int id)
break;
default:
delete[] selectedStr;
return;
}
for (int i = 0; i < hashLen; i++)
@ -3891,15 +3914,6 @@ void Notepad_plus::command(int id)
{
WindowsDlg _windowsDlg;
_windowsDlg.init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf(), _pDocTab);
const TiXmlNodeA *nativeLangA = _nativeLangSpeaker.getNativeLangA();
TiXmlNodeA *dlgNode = NULL;
if (nativeLangA)
{
dlgNode = nativeLangA->FirstChild("Dialog");
if (dlgNode)
dlgNode = _nativeLangSpeaker.searchDlgNode(dlgNode, "Window");
}
_windowsDlg.doDialog();
}
break;

View File

@ -683,8 +683,11 @@ bool Notepad_plus::doSave(BufferID id, const wchar_t * filename, bool isCopy)
}
else if (res == SavingStatus::SaveWritingFailed)
{
wstring errorMessage = GetLastErrorAsString(GetLastError());
::MessageBox(_pPublicInterface->getHSelf(), errorMessage.c_str(), L"Save failed", MB_OK | MB_ICONWARNING);
if (!(NppParameters::getInstance()).isEndSessionCritical()) // can we report to the user?
{
wstring errorMessage = GetLastErrorAsString(::GetLastError());
::MessageBox(_pPublicInterface->getHSelf(), errorMessage.c_str(), L"Save failed", MB_OK | MB_ICONWARNING);
}
}
else if (res == SavingStatus::SaveOpenFailed)
{

View File

@ -623,6 +623,7 @@ int hexStrVal(const wchar_t *str)
int getKwClassFromName(const wchar_t *str)
{
if(!str) return -1;
if (!lstrcmp(L"instre1", str)) return LANG_INDEX_INSTR;
if (!lstrcmp(L"instre2", str)) return LANG_INDEX_INSTR2;
if (!lstrcmp(L"type1", str)) return LANG_INDEX_TYPE;
@ -1077,9 +1078,12 @@ bool NppParameters::reloadStylers(const wchar_t* stylePath)
getUserStylersFromXmlTree();
// Reload plugin styles.
for ( size_t i = 0; i < getExternalLexerDoc()->size(); ++i)
for (size_t i = 0; i < getExternalLexerDoc()->size(); ++i)
{
getExternalLexerFromXmlTree( getExternalLexerDoc()->at(i) );
TiXmlDocument* externalLexerDoc = getExternalLexerDoc()->at(i);
TiXmlNode* root = externalLexerDoc->FirstChild(L"NotepadPlus");
if (root)
feedStylerArray(root);
}
return true;
}
@ -1929,7 +1933,7 @@ int NppParameters::addExternalLangToEnd(ExternalLangContainer * externalLang)
bool NppParameters::getUserStylersFromXmlTree()
{
TiXmlNode *root = _pXmlUserStylerDoc->FirstChild(L"NotepadPlus");
if (!root) return false;
if (!root) return false;
return feedStylerArray(root);
}
@ -2645,13 +2649,15 @@ void NppParameters::feedColumnEditorParameters(TiXmlNode *node)
if (strVal)
{
if (lstrcmp(strVal, L"hex") == 0)
_columnEditParam._formatChoice = 1;
_columnEditParam._formatChoice = BASE_16;
else if (lstrcmp(strVal, L"hexuc") == 0)
_columnEditParam._formatChoice = BASE_16_UPPERCASE;
else if (lstrcmp(strVal, L"oct") == 0)
_columnEditParam._formatChoice = 2;
_columnEditParam._formatChoice = BASE_08;
else if (lstrcmp(strVal, L"bin") == 0)
_columnEditParam._formatChoice = 3;
_columnEditParam._formatChoice = BASE_02;
else // "dec"
_columnEditParam._formatChoice = 0;
_columnEditParam._formatChoice = BASE_10;
}
strVal = (childNode->ToElement())->Attribute(L"leadingChoice");
@ -4366,11 +4372,13 @@ bool NppParameters::writeColumnEditorSettings() const
(numberNode.ToElement())->SetAttribute(L"increase", _columnEditParam._increaseNum);
(numberNode.ToElement())->SetAttribute(L"repeat", _columnEditParam._repeatNum);
wstring format = L"dec";
if (_columnEditParam._formatChoice == 1)
if (_columnEditParam._formatChoice == BASE_16)
format = L"hex";
else if (_columnEditParam._formatChoice == 2)
else if (_columnEditParam._formatChoice == BASE_16_UPPERCASE)
format = L"hexuc";
else if (_columnEditParam._formatChoice == BASE_08)
format = L"oct";
else if (_columnEditParam._formatChoice == 3)
else if (_columnEditParam._formatChoice == BASE_02)
format = L"bin";
(numberNode.ToElement())->SetAttribute(L"formatChoice", format);
wstring leading = L"none";
@ -7361,7 +7369,14 @@ void NppParameters::createXmlTreeFromGUIParams()
pStr = (_nppGUI._tabStatus & TAB_MULTILINE) ? L"yes" : L"no";
GUIConfigElement->SetAttribute(L"multiLine", pStr);
pStr = (_nppGUI._tabStatus & TAB_HIDE) ? L"yes" : L"no";
if (_nppGUI._forceTabbarVisible)
{
pStr = L"no";
}
else
{
pStr = (_nppGUI._tabStatus & TAB_HIDE) ? L"yes" : L"no";
}
GUIConfigElement->SetAttribute(L"hide", pStr);
pStr = (_nppGUI._tabStatus & TAB_QUITONEMPTY) ? L"yes" : L"no";
@ -8191,7 +8206,7 @@ int NppParameters::langTypeToCommandID(LangType lt) const
id = IDM_LANG_HTML; break;
case L_XML :
id = IDM_LANG_XML; break;
case L_JS :
case L_JS_EMBEDDED :
case L_JAVASCRIPT:
id = IDM_LANG_JS; break;
case L_JSON:
@ -9137,3 +9152,14 @@ COLORREF NppParameters::getFindDlgStatusMsgColor(int colourIndex)
return findDlgStatusMessageColor[colourIndex];
}
LanguageNameInfo NppParameters::getLangNameInfoFromNameID(const wstring& langNameID)
{
LanguageNameInfo res;
for (LanguageNameInfo lnf : ScintillaEditView::_langNameInfoArray)
{
if (lnf._langName == langNameID)
return lnf;
}
return res;
}

View File

@ -848,6 +848,7 @@ struct NppGUI final
bool _menuBarShow = true;
int _tabStatus = (TAB_DRAWTOPBAR | TAB_DRAWINACTIVETAB | TAB_DRAGNDROP | TAB_REDUCE | TAB_CLOSEBUTTON | TAB_PINBUTTON);
bool _forceTabbarVisible = false;
bool _splitterPos = POS_VERTICAL;
int _userDefineDlgStatus = UDD_DOCKED;
@ -1319,7 +1320,7 @@ struct ColumnEditorParam final
int _initialNum = -1;
int _increaseNum = -1;
int _repeatNum = -1;
int _formatChoice = 0; // 0:Dec 1:Hex 2:Oct 3:Bin
int _formatChoice = 0; // 0:Dec 1:Hex 2:Oct 3:Bin 4:HexUpperCase
leadingChoice _leadingChoice = noneLeading;
};
@ -1506,6 +1507,8 @@ private:
std::wstring _lastCmdLabel;
};
struct LanguageNameInfo;
class NppParameters final
{
private:
@ -1909,6 +1912,9 @@ public:
ColumnEditorParam _columnEditParam;
unsigned long getScintillaModEventMask() const { return _sintillaModEventMask; };
void addScintillaModEventMask(unsigned long mask2Add) { _sintillaModEventMask |= mask2Add; };
bool isAsNotepadStyle() const { return _asNotepadStyle; }
LanguageNameInfo getLangNameInfoFromNameID(const std::wstring& langNameID);
private:
NppParameters();

View File

@ -1223,7 +1223,7 @@ const wchar_t * AutoCompletion::getApiFileName()
_curLang = L_TEXT;
if (_curLang == L_JAVASCRIPT)
_curLang = L_JS;
_curLang = L_JS_EMBEDDED;
return ScintillaEditView::_langNameInfoArray[_curLang]._langName;
}

View File

@ -65,6 +65,15 @@ namespace // anonymous
return defvalue; // fallback unknown
}
// local helper to get the current system time in milliseconds since Unix epoch (January 1, 1970)
ULONGLONG GetUnixSysTimeInMilliseconds()
{
FILETIME ft;
::GetSystemTimeAsFileTime(&ft); // 100-nanosecond intervals since January 1, 1601 (UTC)
ULONGLONG ullTime = (((ULONGLONG)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
const ULONGLONG EPOCH_DIFF = 116444736000000000ULL; // difference between Jan 1, 1601 and Jan 1, 1970 in 100-ns intervals
return (ullTime - EPOCH_DIFF) / 10000; // subtract the diff and convert to milliseconds
}
} // anonymous namespace
using namespace std;
@ -1093,13 +1102,31 @@ bool FileManager::deleteFile(BufferID id)
}
bool FileManager::moveFile(BufferID id, const wchar_t * newFileName)
bool FileManager::moveFile(BufferID id, const wchar_t* newFileName)
{
Buffer* buf = getBufferByID(id);
const wchar_t *fileNamePath = buf->getFullPathName();
if (::MoveFileEx(fileNamePath, newFileName, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED | MOVEFILE_WRITE_THROUGH) == 0)
if (id == BUFFER_INVALID)
return false;
Buffer* buf = getBufferByID(id);
const wchar_t* fileNamePath = buf->getFullPathName();
if (!::MoveFileExW(fileNamePath, newFileName, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED | MOVEFILE_WRITE_THROUGH))
{
if (::GetLastError() != ERROR_ACCESS_DENIED)
return false;
// ERROR_ACCESS_DENIED, try to move elevated
// (notepad++.exe #UAC-MOVEFILE# original_file_path new_file_path)
wstring strCmdLineParams = NPP_UAC_MOVEFILE_SIGN;
strCmdLineParams += L" \"";
strCmdLineParams += fileNamePath;
strCmdLineParams += L"\" \"";
strCmdLineParams += newFileName;
strCmdLineParams += L"\"";
DWORD dwNppUacOpError = invokeNppUacOp(strCmdLineParams);
if (dwNppUacOpError != NO_ERROR)
return false;
}
buf->setFileName(newFileName);
return true;
}
@ -1323,7 +1350,7 @@ SavingStatus FileManager::saveBuffer(BufferID id, const wchar_t* filename, bool
Buffer* buffer = getBufferByID(id);
bool isHiddenOrSys = false;
wchar_t fullpath[MAX_PATH] = { 0 };
wchar_t fullpath[MAX_PATH]{};
if (isWin32NamespacePrefixedFileName(filename))
{
// use directly the raw file name, skip the GetFullPathName WINAPI
@ -1338,7 +1365,7 @@ SavingStatus FileManager::saveBuffer(BufferID id, const wchar_t* filename, bool
}
}
wchar_t dirDest[MAX_PATH];
wchar_t dirDest[MAX_PATH]{};
wcscpy_s(dirDest, MAX_PATH, fullpath);
::PathRemoveFileSpecW(dirDest);
@ -1379,105 +1406,137 @@ SavingStatus FileManager::saveBuffer(BufferID id, const wchar_t* filename, bool
int encoding = buffer->getEncoding();
if (UnicodeConvertor.openFile(fullpath))
wstring strTempFile = L"";
if (!UnicodeConvertor.openFile(fullpath))
{
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, buffer->_doc); //generate new document
if (NppParameters::getInstance().isEndSessionCritical())
return SavingStatus::SaveOpenFailed; // cannot continue to the UAC-prompt at the Windows logoff/reboot/shutdown time
size_t lengthDoc = _pscratchTilla->getCurrentDocLen();
char* buf = (char*)_pscratchTilla->execute(SCI_GETCHARACTERPOINTER); //to get characters directly from Scintilla buffer
bool isWrittenSuccessful = false;
if (UnicodeConvertor.getLastFileErrorState() != ERROR_ACCESS_DENIED)
return SavingStatus::SaveOpenFailed; // cannot be solved by the UAC-prompt
if (encoding == -1) //no special encoding; can be handled directly by Utf8_16_Write
{
isWrittenSuccessful = UnicodeConvertor.writeFile(buf, lengthDoc);
if (lengthDoc == 0)
isWrittenSuccessful = true;
}
else
{
if (lengthDoc == 0)
{
isWrittenSuccessful = UnicodeConvertor.writeFile(buf, 0);
}
else
{
WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance();
size_t grabSize = 0;
for (size_t i = 0; i < lengthDoc; i += grabSize)
{
grabSize = lengthDoc - i;
if (grabSize > blockSize)
grabSize = blockSize;
// ERROR_ACCESS_DENIED, swap to temporary file copy for the UAC elevation way
int newDataLen = 0;
int incompleteMultibyteChar = 0;
const char* newData = wmc.encode(SC_CP_UTF8, encoding, buf + i, static_cast<int>(grabSize), &newDataLen, &incompleteMultibyteChar);
grabSize -= incompleteMultibyteChar;
isWrittenSuccessful = UnicodeConvertor.writeFile(newData, newDataLen);
}
}
}
wchar_t wszBuf[MAX_PATH + 1]{};
if (::GetTempPath(MAX_PATH, wszBuf) == 0)
return SavingStatus::SaveOpenFailed; // cannot continue
UnicodeConvertor.closeFile();
strTempFile = wszBuf;
strTempFile += L"npp-" + std::to_wstring(GetUnixSysTimeInMilliseconds()) + L".tmp"; // make unique temporary filename
if (!UnicodeConvertor.openFile(strTempFile.c_str()))
return SavingStatus::SaveOpenFailed; // cannot continue, weird
}
// Error, we didn't write the entire document to disk.
if (!isWrittenSuccessful)
{
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault);
return SavingStatus::SaveWritingFailed;
}
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, buffer->_doc); //generate new document
if (isHiddenOrSys)
::SetFileAttributes(fullpath, attributes.dwFileAttributes);
size_t lengthDoc = _pscratchTilla->getCurrentDocLen();
char* buf = (char*)_pscratchTilla->execute(SCI_GETCHARACTERPOINTER); //to get characters directly from Scintilla buffer
bool isWrittenSuccessful = false;
if (isCopy) // "Save a Copy As..." command
{
unsigned long MODEVENTMASK_ON = NppParameters::getInstance().getScintillaModEventMask();
_pscratchTilla->execute(SCI_SETMODEVENTMASK, MODEVENTMASK_OFF);
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault);
_pscratchTilla->execute(SCI_SETMODEVENTMASK, MODEVENTMASK_ON);
return SavingStatus::SaveOK; //all done - we don't change the current buffer's path to "fullpath", since it's "Save a Copy As..." action.
}
buffer->setFileName(fullpath);
// if not a large file and language is normal text (not defined)
// we may try determine its language from its content
if (!buffer->isLargeFile() && buffer->_lang == L_TEXT)
{
LangType detectedLang = detectLanguageFromTextBeginning((unsigned char*)buf, lengthDoc);
// if a language is detected from the content
if (detectedLang != L_TEXT)
{
buffer->_lang = detectedLang;
buffer->doNotify(BufferChangeFilename | BufferChangeTimestamp | BufferChangeLanguage);
}
}
buffer->setDirty(false);
buffer->setUnsync(false);
buffer->setSavePointDirty(false);
buffer->setStatus(DOC_REGULAR);
buffer->checkFileState();
_pscratchTilla->execute(SCI_SETSAVEPOINT);
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault);
wstring backupFilePath = buffer->getBackupFileName();
if (!backupFilePath.empty())
{
// delete backup file
buffer->setBackupFileName(wstring());
::DeleteFile(backupFilePath.c_str());
}
return SavingStatus::SaveOK;
if (encoding == -1) //no special encoding; can be handled directly by Utf8_16_Write
{
isWrittenSuccessful = UnicodeConvertor.writeFile(buf, lengthDoc);
if (lengthDoc == 0)
isWrittenSuccessful = true;
}
else
{
return SavingStatus::SaveOpenFailed;
if (lengthDoc == 0)
{
isWrittenSuccessful = UnicodeConvertor.writeFile(buf, 0);
}
else
{
WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance();
size_t grabSize = 0;
for (size_t i = 0; i < lengthDoc; i += grabSize)
{
grabSize = lengthDoc - i;
if (grabSize > blockSize)
grabSize = blockSize;
int newDataLen = 0;
int incompleteMultibyteChar = 0;
const char* newData = wmc.encode(SC_CP_UTF8, encoding, buf + i, static_cast<int>(grabSize), &newDataLen, &incompleteMultibyteChar);
grabSize -= incompleteMultibyteChar;
isWrittenSuccessful = UnicodeConvertor.writeFile(newData, newDataLen);
}
}
}
UnicodeConvertor.closeFile();
if (isHiddenOrSys && strTempFile.empty())
::SetFileAttributes(fullpath, attributes.dwFileAttributes);
// Error, we didn't write the entire document to disk.
if (!isWrittenSuccessful)
{
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault);
if (!strTempFile.empty())
::DeleteFileW(strTempFile.c_str());
return SavingStatus::SaveWritingFailed;
}
if (!strTempFile.empty())
{
// elevated saving/overwriting of the original file by the help of the tempfile
// (notepad++.exe #UAC-SAVE# temp_file_path dest_file_path)
wstring strCmdLineParams = NPP_UAC_SAVE_SIGN;
strCmdLineParams += L" \"" + strTempFile + L"\" \"";
strCmdLineParams += fullpath;
strCmdLineParams += L"\"";
DWORD dwNppUacOpError = invokeNppUacOp(strCmdLineParams);
if (dwNppUacOpError != NO_ERROR)
{
::DeleteFileW(strTempFile.c_str()); // ensure no failed op remnant
::SetLastError(dwNppUacOpError); // set that as our current thread one for reporting later
return SavingStatus::SaveWritingFailed;
}
}
if (isCopy) // "Save a Copy As..." command
{
unsigned long MODEVENTMASK_ON = NppParameters::getInstance().getScintillaModEventMask();
_pscratchTilla->execute(SCI_SETMODEVENTMASK, MODEVENTMASK_OFF);
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault);
_pscratchTilla->execute(SCI_SETMODEVENTMASK, MODEVENTMASK_ON);
return SavingStatus::SaveOK; //all done - we don't change the current buffer's path to "fullpath", since it's "Save a Copy As..." action.
}
buffer->setFileName(fullpath);
// if not a large file and language is normal text (not defined)
// we may try determine its language from its content
if (!buffer->isLargeFile() && buffer->_lang == L_TEXT)
{
LangType detectedLang = detectLanguageFromTextBeginning((unsigned char*)buf, lengthDoc);
// if a language is detected from the content
if (detectedLang != L_TEXT)
{
buffer->_lang = detectedLang;
buffer->doNotify(BufferChangeFilename | BufferChangeTimestamp | BufferChangeLanguage);
}
}
buffer->setDirty(false);
buffer->setUnsync(false);
buffer->setSavePointDirty(false);
buffer->setStatus(DOC_REGULAR);
buffer->checkFileState();
_pscratchTilla->execute(SCI_SETSAVEPOINT);
_pscratchTilla->execute(SCI_SETDOCPOINTER, 0, _scratchDocDefault);
wstring backupFilePath = buffer->getBackupFileName();
if (!backupFilePath.empty())
{
// delete backup file
buffer->setBackupFileName(wstring());
::DeleteFile(backupFilePath.c_str());
}
return SavingStatus::SaveOK;
}
size_t FileManager::nextUntitledNewNumber() const

View File

@ -49,31 +49,42 @@ void addText2Combo(const wchar_t * txt2add, HWND hCombo)
wstring getTextFromCombo(HWND hCombo)
{
wchar_t str[FINDREPLACE_MAXLENGTH] = { '\0' };
::SendMessage(hCombo, WM_GETTEXT, FINDREPLACE_MAXLENGTH - 1, reinterpret_cast<LPARAM>(str));
return wstring(str);
const int strSize = FINDREPLACE_MAXLENGTH;
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
::SendMessage(hCombo, WM_GETTEXT, FINDREPLACE_MAXLENGTH - 1, reinterpret_cast<LPARAM>(str.get()));
return wstring(str.get());
}
void delLeftWordInEdit(HWND hEdit)
{
wchar_t str[FINDREPLACE_MAXLENGTH] = { '\0' };
::SendMessage(hEdit, WM_GETTEXT, FINDREPLACE_MAXLENGTH - 1, reinterpret_cast<LPARAM>(str));
const int strSize = FINDREPLACE_MAXLENGTH;
auto str = std::make_unique<wchar_t[]>(strSize);
std::fill_n(str.get(), strSize, L'\0');
::SendMessage(hEdit, WM_GETTEXT, FINDREPLACE_MAXLENGTH - 1, reinterpret_cast<LPARAM>(str.get()));
WORD cursor = 0;
::SendMessage(hEdit, EM_GETSEL, (WPARAM)&cursor, 0);
WORD wordstart = cursor;
while (wordstart > 0) {
while (wordstart > 0)
{
wchar_t c = str[wordstart - 1];
if (c != ' ' && c != '\t')
break;
--wordstart;
}
while (wordstart > 0) {
while (wordstart > 0)
{
wchar_t c = str[wordstart - 1];
if (c == ' ' || c == '\t')
break;
--wordstart;
}
if (wordstart < cursor) {
if (wordstart < cursor)
{
::SendMessage(hEdit, EM_SETSEL, (WPARAM)wordstart, (LPARAM)cursor);
::SendMessage(hEdit, EM_REPLACESEL, (WPARAM)TRUE, reinterpret_cast<LPARAM>(L""));
}
@ -237,6 +248,20 @@ void Searching::displaySectionCentered(size_t posStart, size_t posEnd, Scintilla
// Adjust so that we see the entire match; primarily horizontally
pEditView->execute(SCI_SCROLLRANGE, posStart, posEnd);
// make sure won't start/end the selection in the middle of a multibyte character,
// or in between a CR/LF pair for Windows files
// (needed for stale search-results where user has made doc edits after the search)
if (posStart > 0)
{
posStart = pEditView->execute(SCI_POSITIONBEFORE, posStart);
posStart = pEditView->execute(SCI_POSITIONAFTER, posStart);
}
if (posEnd > 0)
{
posEnd = pEditView->execute(SCI_POSITIONBEFORE, posEnd);
posEnd = pEditView->execute(SCI_POSITIONAFTER, posEnd);
}
// Move cursor to end of result and select result
pEditView->execute(SCI_GOTOPOS, posEnd);
pEditView->execute(SCI_SETANCHOR, posStart);
@ -486,7 +511,10 @@ void FindReplaceDlg::saveFindHistory()
int FindReplaceDlg::saveComboHistory(int id, int maxcount, vector<wstring> & strings, bool saveEmpty)
{
wchar_t text[FINDREPLACE_MAXLENGTH] = { '\0' };
const int strSize = FINDREPLACE_MAXLENGTH;
auto text = std::make_unique<wchar_t[]>(strSize);
std::fill_n(text.get(), strSize, L'\0');
HWND hCombo = ::GetDlgItem(_hSelf, id);
int count = static_cast<int32_t>(::SendMessage(hCombo, CB_GETCOUNT, 0, 0));
count = std::min<int>(count, maxcount);
@ -506,10 +534,10 @@ int FindReplaceDlg::saveComboHistory(int id, int maxcount, vector<wstring> & str
for (int i = 0 ; i < count ; ++i)
{
auto cbTextLen = ::SendMessage(hCombo, CB_GETLBTEXTLEN, i, 0);
if (cbTextLen <= FINDREPLACE_MAXLENGTH - 1)
if (cbTextLen <= FINDREPLACE_MAXLENGTH2SAVE - 1)
{
::SendMessage(hCombo, CB_GETLBTEXT, i, reinterpret_cast<LPARAM>(text));
strings.push_back(wstring(text));
::SendMessage(hCombo, CB_GETLBTEXT, i, reinterpret_cast<LPARAM>(text.get()));
strings.push_back(wstring(text.get()));
}
}
return count;
@ -1550,6 +1578,10 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
HWND hFindCombo = ::GetDlgItem(_hSelf, IDFINDWHAT);
HWND hReplaceCombo = ::GetDlgItem(_hSelf, IDREPLACEWITH);
::SendMessage(hFindCombo, CB_LIMITTEXT, FINDREPLACE_MAXLENGTH - 1, 0);
::SendMessage(hReplaceCombo, CB_LIMITTEXT, FINDREPLACE_MAXLENGTH - 1, 0);
HWND hFiltersCombo = ::GetDlgItem(_hSelf, IDD_FINDINFILES_FILTERS_COMBO);
HWND hDirCombo = ::GetDlgItem(_hSelf, IDD_FINDINFILES_DIR_COMBO);
@ -1918,6 +1950,14 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
return TRUE;
}
case WM_NCLBUTTONDOWN:
{
if (_maxLenOnSearchTip.isValid())
{
_maxLenOnSearchTip.hide();
}
return FALSE;
}
case WM_COMMAND:
{
@ -1926,6 +1966,74 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
FindHistory & findHistory = nppParamInst.getFindHistory();
switch (LOWORD(wParam))
{
case IDFINDWHAT:
case IDREPLACEWITH:
{
if (HIWORD(wParam) == CBN_EDITUPDATE)
{
HWND hComboBox = ::GetDlgItem(_hSelf, LOWORD(wParam));
LRESULT length = ::GetWindowTextLength(hComboBox);
if (length >= FINDREPLACE_MAXLENGTH - 1)
{
if (!_maxLenOnSearchTip.isValid()) // Create the tooltip and add the tool ONLY ONCE
{
NativeLangSpeaker* pNativeSpeaker = nppParamInst.getNativeLangSpeaker();
wstring tip = pNativeSpeaker->getLocalizedStrFromID("max-len-on-search-tip", L"Only $INT_REPLACE$ characters are allowed for the find/replace text length - your input could be truncated, and it won't be saved for the next session.");
tip = stringReplace(tip, L"$INT_REPLACE$", std::to_wstring(FINDREPLACE_MAXLENGTH - 1));
static wstring maxLenOnSearchTip = tip;
bool isSuccessful = _maxLenOnSearchTip.init(_hInst, hComboBox, _hSelf, maxLenOnSearchTip.c_str(), _isRTL);
if (!isSuccessful)
{
return FALSE;
}
NppDarkMode::setDarkTooltips(_maxLenOnSearchTip.getTipHandle(), NppDarkMode::ToolTipsType::tooltip);
}
_maxLenOnSearchTip.show();
}
else if (length >= FINDREPLACE_MAXLENGTH2SAVE - 1) // FINDREPLACE_MAXLENGTH2SAVE < length < FINDREPLACE_MAXLENGTH
{
if (!_maxLenOnSearchTip.isValid()) // Create the tooltip and add the tool ONLY ONCE
{
NativeLangSpeaker* pNativeSpeaker = nppParamInst.getNativeLangSpeaker();
wstring tip = pNativeSpeaker->getLocalizedStrFromID("max-len-on-save-tip", L"This search input (> $INT_REPLACE$ characters) won't be saved for the next session");
tip = stringReplace(tip, L"$INT_REPLACE$", std::to_wstring(FINDREPLACE_MAXLENGTH2SAVE - 1));
static wstring maxLenOnSaveTip = tip;
bool isSuccessful = _maxLenOnSearchTip.init(_hInst, hComboBox, _hSelf, maxLenOnSaveTip.c_str(), _isRTL);
if (!isSuccessful)
{
return FALSE;
}
NppDarkMode::setDarkTooltips(_maxLenOnSearchTip.getTipHandle(), NppDarkMode::ToolTipsType::tooltip);
}
_maxLenOnSearchTip.show();
}
else
{
if (_maxLenOnSearchTip.isValid())
{
_maxLenOnSearchTip.hide();
}
}
}
else if (HIWORD(wParam) == CBN_KILLFOCUS || HIWORD(wParam) == CBN_SELCHANGE)
{
if (_maxLenOnSearchTip.isValid())
{
_maxLenOnSearchTip.hide();
}
}
return TRUE;
}
//Single actions
case IDC_2_BUTTONS_MODE:
{
@ -2007,7 +2115,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
FindStatus findStatus = FSFound;
processFindNext(_options._str2Search.c_str(), _env, &findStatus);
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
NativeLangSpeaker *pNativeSpeaker = nppParamInst.getNativeLangSpeaker();
if (findStatus == FSEndReached)
{
wstring msg = pNativeSpeaker->getLocalizedStrFromID("find-status-end-reached", FIND_STATUS_END_REACHED_TEXT);
@ -2362,8 +2470,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
if (_currentStatus == REPLACE_DLG)
{
NppParameters& nppParam = NppParameters::getInstance();
const NppGUI& nppGui = nppParam.getNppGUI();
const NppGUI& nppGui = nppParamInst.getNppGUI();
if (!nppGui._confirmReplaceInAllOpenDocs || replaceInOpenDocsConfirmCheck())
{
setStatusbarMessage(L"", FSNoMessage);
@ -2391,7 +2498,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
setStatusbarMessage(L"", FSNoMessage);
if ((*_ppEditView)->getCurrentBuffer()->isReadOnly())
{
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
NativeLangSpeaker *pNativeSpeaker = nppParamInst.getNativeLangSpeaker();
wstring msg = pNativeSpeaker->getLocalizedStrFromID("find-status-replace-readonly", L"Replace: Cannot replace text. The current document is read only.");
setStatusbarMessage(msg, FSNotFound);
return TRUE;
@ -2411,7 +2518,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
nppParamInst._isFindReplacing = false;
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
NativeLangSpeaker *pNativeSpeaker = nppParamInst.getNativeLangSpeaker();
if (nbReplaced == FIND_INVALID_REGULAR_EXPRESSION)
{
setStatusbarMessageWithRegExprErr(*_ppEditView);
@ -2456,7 +2563,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
int nbCounted = processAll(ProcessCountAll, &_options);
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
NativeLangSpeaker *pNativeSpeaker = nppParamInst.getNativeLangSpeaker();
if (nbCounted == FIND_INVALID_REGULAR_EXPRESSION)
{
setStatusbarMessageWithRegExprErr(*_ppEditView);
@ -2509,7 +2616,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
nppParamInst._isFindReplacing = false;
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
NativeLangSpeaker *pNativeSpeaker = nppParamInst.getNativeLangSpeaker();
if (nbMarked == FIND_INVALID_REGULAR_EXPRESSION)
{
setStatusbarMessageWithRegExprErr(*_ppEditView);
@ -2675,7 +2782,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
{
::SendDlgItemMessage(_hSelf, IDC_TRANSPARENT_LOSSFOCUS_RADIO, BM_SETCHECK, BST_UNCHECKED, 0);
::SendDlgItemMessage(_hSelf, IDC_TRANSPARENT_ALWAYS_RADIO, BM_SETCHECK, BST_UNCHECKED, 0);
(NppParameters::getInstance()).removeTransparent(_hSelf);
nppParamInst.removeTransparent(_hSelf);
findHistory._transparencyMode = FindHistory::none;
}
@ -2685,14 +2792,14 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
case IDC_TRANSPARENT_ALWAYS_RADIO :
{
int percent = static_cast<int32_t>(::SendDlgItemMessage(_hSelf, IDC_PERCENTAGE_SLIDER, TBM_GETPOS, 0, 0));
(NppParameters::getInstance()).SetTransparent(_hSelf, percent);
nppParamInst.SetTransparent(_hSelf, percent);
findHistory._transparencyMode = FindHistory::persistent;
}
return TRUE;
case IDC_TRANSPARENT_LOSSFOCUS_RADIO :
{
(NppParameters::getInstance()).removeTransparent(_hSelf);
nppParamInst.removeTransparent(_hSelf);
findHistory._transparencyMode = FindHistory::onLosingFocus;
}
return TRUE;
@ -2761,7 +2868,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
{
if (_currentStatus == FINDINFILES_DLG)
{
NativeLangSpeaker* pNativeSpeaker = NppParameters::getInstance().getNativeLangSpeaker();
NativeLangSpeaker* pNativeSpeaker = nppParamInst.getNativeLangSpeaker();
const wstring title = pNativeSpeaker->getLocalizedStrFromID("find-in-files-select-folder", L"Select a folder to search from");
folderBrowser(_hSelf, title, IDD_FINDINFILES_DIR_COMBO, _options._directory.c_str());
}
@ -2773,7 +2880,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
RECT rc{};
getWindowRect(rc);
LONG w = rc.right - rc.left;
bool& isLessModeOn = NppParameters::getInstance().getNppGUI()._findWindowLessMode;
bool& isLessModeOn = nppParamInst.getNppGUI()._findWindowLessMode;
isLessModeOn = !isLessModeOn;
long dlgH = (isLessModeOn ? _lesssModeHeight : _szMinDialog.cy) + _szBorder.cy;
@ -2895,6 +3002,7 @@ bool FindReplaceDlg::processFindNext(const wchar_t *txt2find, const FindOption *
(*_ppEditView)->execute(SCI_SETSEARCHFLAGS, flags);
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
posFind = (*_ppEditView)->searchInTarget(pText, stringSizeFind, startPosition, endPosition);
if (posFind == -1) //no match found in target, check if a new target should be used
@ -2928,7 +3036,6 @@ bool FindReplaceDlg::processFindNext(const wchar_t *txt2find, const FindOption *
//failed, or failed twice with wrap
if (pOptions->_incrementalType == NotIncremental) //incremental search doesn't trigger messages
{
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
wstring warningMsg = pNativeSpeaker->getLocalizedStrFromID("find-status-cannot-find", L"Find: Can't find the text \"$STR_REPLACE$\"");
wstring newTxt2find = stringReplace(txt2find, L"&", L"&&");
@ -2968,6 +3075,7 @@ bool FindReplaceDlg::processFindNext(const wchar_t *txt2find, const FindOption *
else if (posFind == FIND_INVALID_REGULAR_EXPRESSION)
{ // error
setStatusbarMessageWithRegExprErr(*_ppEditView);
delete[] pText;
return false;
}
@ -2983,7 +3091,6 @@ bool FindReplaceDlg::processFindNext(const wchar_t *txt2find, const FindOption *
// Show a calltip for a zero length match
if (start == end)
{
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
wstring msg = pNativeSpeaker->getLocalizedStrFromID("find-regex-zero-length-match", L"zero length match");
msg = L"^ " + msg;
(*_ppEditView)->showCallTip(start, msg.c_str());
@ -3022,6 +3129,8 @@ bool FindReplaceDlg::processReplace(const wchar_t *txt2find, const wchar_t *txt2
FindStatus status;
moreMatches = processFindNext(txt2find, &replaceOptions, &status, FINDNEXTTYPE_FINDNEXTFORREPLACE);
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
if (moreMatches)
{
Sci_CharacterRangeFull nextFind = (*_ppEditView)->getSelection();
@ -3056,8 +3165,6 @@ bool FindReplaceDlg::processReplace(const wchar_t *txt2find, const wchar_t *txt2
}
(*_ppEditView)->execute(SCI_SETSEL, start + replacedLen, start + replacedLen);
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
NppParameters& nppParam = NppParameters::getInstance();
const NppGUI& nppGui = nppParam.getNppGUI();
@ -3098,7 +3205,6 @@ bool FindReplaceDlg::processReplace(const wchar_t *txt2find, const wchar_t *txt2
{
if (_statusbarTooltipMsg.empty()) // Tooltip message non-empty means there's a find problem - so we keep the message as it is and not erase it
{
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
wstring msg = pNativeSpeaker->getLocalizedStrFromID("find-status-replace-not-found", L"Replace: no occurrence was found");
msg += L" ";
@ -3564,8 +3670,9 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl
default:
{
delete [] pTextFind;
delete [] pTextReplace;
delete[] pTextFind;
if (pTextReplace)
delete[] pTextReplace;
return nbProcessed;
}
@ -3581,8 +3688,9 @@ int FindReplaceDlg::processRange(ProcessOperation op, FindReplaceInfo & findRepl
findReplaceInfo._endRange += replaceDelta; //adjust end of range in case of replace
}
delete [] pTextFind;
delete [] pTextReplace;
delete[] pTextFind;
if (pTextReplace)
delete[] pTextReplace;
if (nbProcessed > 0)
{
@ -4775,7 +4883,9 @@ LRESULT FAR PASCAL FindReplaceDlg::comboEditProc(HWND hwnd, UINT message, WPARAM
bool isDropped = ::SendMessage(hwndCombo, CB_GETDROPPEDSTATE, 0, 0) != 0;
static wchar_t draftString[FINDREPLACE_MAXLENGTH]{};
const size_t strSize = FINDREPLACE_MAXLENGTH;
auto draftString = std::make_unique<wchar_t[]>(strSize);
std::fill_n(draftString.get(), strSize, L'\0');
if (isDropped && (message == WM_KEYDOWN) && (wParam == VK_DELETE))
{
@ -4809,7 +4919,7 @@ LRESULT FAR PASCAL FindReplaceDlg::comboEditProc(HWND hwnd, UINT message, WPARAM
else if ((message == WM_KEYDOWN) && (wParam == VK_DOWN) && (::SendMessage(hwndCombo, CB_GETCURSEL, 0, 0) == CB_ERR))
{
// down key on unselected combobox item -> store current edit text as draft
::SendMessage(hwndCombo, WM_GETTEXT, FINDREPLACE_MAXLENGTH - 1, reinterpret_cast<LPARAM>(draftString));
::SendMessage(hwndCombo, WM_GETTEXT, FINDREPLACE_MAXLENGTH - 1, reinterpret_cast<LPARAM>(draftString.get()));
}
else if ((message == WM_KEYDOWN) && (wParam == VK_UP) && (::SendMessage(hwndCombo, CB_GETCURSEL, 0, 0) == CB_ERR))
{
@ -4817,11 +4927,11 @@ LRESULT FAR PASCAL FindReplaceDlg::comboEditProc(HWND hwnd, UINT message, WPARAM
::SendMessage(hwndCombo, CB_SETEDITSEL, 0, MAKELPARAM(0, -1));
return 0;
}
else if ((message == WM_KEYDOWN) && (wParam == VK_UP) && (::SendMessage(hwndCombo, CB_GETCURSEL, 0, 0) == 0) && std::wcslen(draftString) > 0)
else if ((message == WM_KEYDOWN) && (wParam == VK_UP) && (::SendMessage(hwndCombo, CB_GETCURSEL, 0, 0) == 0) && std::wcslen(draftString.get()) > 0)
{
// up key on top selected combobox item -> restore draft to edit text
::SendMessage(hwndCombo, CB_SETCURSEL, WPARAM(-1), 0);
::SendMessage(hwndCombo, WM_SETTEXT, FINDREPLACE_MAXLENGTH - 1, reinterpret_cast<LPARAM>(draftString));
::SendMessage(hwndCombo, WM_SETTEXT, FINDREPLACE_MAXLENGTH - 1, reinterpret_cast<LPARAM>(draftString.get()));
::SendMessage(hwndCombo, CB_SETEDITSEL, 0, MAKELPARAM(0, -1));
return 0;
@ -6143,9 +6253,12 @@ void FindIncrementDlg::markSelectedTextInc(bool enable, FindOption *opt)
if (range.cpMin == range.cpMax)
return;
wchar_t text2Find[FINDREPLACE_MAXLENGTH]{};
(*(_pFRDlg->_ppEditView))->getGenericSelectedText(text2Find, FINDREPLACE_MAXLENGTH, false); //do not expand selection (false)
opt->_str2Search = text2Find;
const int strSize = FINDREPLACE_MAXLENGTH;
auto text2Find = std::make_unique<wchar_t[]>(strSize);
std::fill_n(text2Find.get(), strSize, L'\0');
(*(_pFRDlg->_ppEditView))->getGenericSelectedText(text2Find.get(), FINDREPLACE_MAXLENGTH, false); //do not expand selection (false)
opt->_str2Search = text2Find.get();
_pFRDlg->markAllInc(opt);
}

View File

@ -29,7 +29,8 @@
#define FIND_INVALID_REGULAR_EXPRESSION -2
#define FINDREPLACE_MAXLENGTH 2048
#define FINDREPLACE_MAXLENGTH 16384 // the maximum length of the string (decrease 1 for '\0') to search in the editor
#define FINDREPLACE_MAXLENGTH2SAVE 2048 // the maximum length of the string (decrease 1 for '\0') to save in the config.xml file
#define FINDTEMPSTRING_MAXSIZE 1024*1024
@ -484,6 +485,8 @@ private:
std::vector<int> _reduce2hide_fip = { IDD_FINDINFILES_FILTERS_STATIC, IDD_FINDINFILES_FILTERS_COMBO, IDCANCEL };
std::vector<int> _reduce2hide_mark = { IDC_MARKLINE_CHECK, IDC_PURGE_CHECK, IDC_IN_SELECTION_CHECK, IDC_REPLACEINSELECTION, IDC_COPY_MARKED_TEXT, IDCANCEL };
ControlInfoTip _maxLenOnSearchTip;
void enableFindDlgItem(int dlgItemID, bool isEnable = true);
void showFindDlgItem(int dlgItemID, bool isShow = true);

View File

@ -67,7 +67,10 @@ const int ScintillaEditView::_markersArray[][NB_FOLDER_STATE] = {
// The order of lang type (enum LangType) must be respected
LanguageNameInfo ScintillaEditView::_langNameInfoArray[L_EXTERNAL + 1] = {
//
//_langName _shortName _longName _langID _lexerID
// _langName: _shortName _longName _langID _lexerID
//
// link to lang.xml
// don't change
//
{L"normal", L"Normal text", L"Normal text file", L_TEXT, "null"},
{L"php", L"PHP", L"PHP Hypertext Preprocessor file", L_PHP, "phpscript"},
@ -88,7 +91,7 @@ LanguageNameInfo ScintillaEditView::_langNameInfoArray[L_EXTERNAL + 1] = {
{L"asp", L"ASP", L"Active Server Pages script file", L_ASP, "hypertext"},
{L"sql", L"SQL", L"Structured Query Language file", L_SQL, "sql"},
{L"vb", L"Visual Basic", L"Visual Basic file", L_VB, "vb"},
{L"javascript", L"JavaScript", L"JavaScript file", L_JS, "cpp"},
{L"javascript", L"Embedded JS", L"Embedded JavaScript", L_JS_EMBEDDED, "cpp"},
{L"css", L"CSS", L"Cascade Style Sheets File", L_CSS, "css"},
{L"perl", L"Perl", L"Perl source file", L_PERL, "perl"},
{L"python", L"Python", L"Python file", L_PYTHON, "python"},
@ -349,13 +352,16 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
if (_defaultCharList.empty())
{
auto defaultCharListLen = execute(SCI_GETWORDCHARS);
char *defaultCharList = new char[defaultCharListLen + 1];
if(defaultCharList)
if(defaultCharListLen > 0)
{
execute(SCI_GETWORDCHARS, 0, reinterpret_cast<LPARAM>(defaultCharList));
defaultCharList[defaultCharListLen] = '\0';
_defaultCharList = defaultCharList;
delete[] defaultCharList;
char *defaultCharList = new char[defaultCharListLen + 1];
if(defaultCharList)
{
execute(SCI_GETWORDCHARS, 0, reinterpret_cast<LPARAM>(defaultCharList));
defaultCharList[defaultCharListLen] = '\0';
_defaultCharList = defaultCharList;
delete[] defaultCharList;
}
}
}
unsigned long MODEVENTMASK_ON = nppParams.getScintillaModEventMask();
@ -882,7 +888,7 @@ void ScintillaEditView::setHTMLLexer()
void ScintillaEditView::setEmbeddedJSLexer()
{
const wchar_t *pKwArray[NB_LIST] = {NULL};
makeStyle(L_JS, pKwArray);
makeStyle(L_JS_EMBEDDED, pKwArray);
basic_string<char> keywordList("");
if (pKwArray[LANG_INDEX_INSTR])
@ -891,8 +897,8 @@ void ScintillaEditView::setEmbeddedJSLexer()
keywordList = wstring2string(kwlW, CP_ACP);
}
execute(SCI_SETKEYWORDS, 1, reinterpret_cast<LPARAM>(getCompleteKeywordList(keywordList, L_JS, LANG_INDEX_INSTR)));
populateSubStyleKeywords(L_JS, SCE_HJ_WORD, 8, LANG_INDEX_SUBSTYLE1, pKwArray);
execute(SCI_SETKEYWORDS, 1, reinterpret_cast<LPARAM>(getCompleteKeywordList(keywordList, L_JS_EMBEDDED, LANG_INDEX_INSTR)));
populateSubStyleKeywords(L_JS_EMBEDDED, SCE_HJ_WORD, 8, LANG_INDEX_SUBSTYLE1, pKwArray);
execute(SCI_STYLESETEOLFILLED, SCE_HJ_DEFAULT, true);
execute(SCI_STYLESETEOLFILLED, SCE_HJ_COMMENT, true);
execute(SCI_STYLESETEOLFILLED, SCE_HJ_COMMENTDOC, true);
@ -1266,7 +1272,7 @@ void ScintillaEditView::setJsLexer()
}
else // New js styler is not available, we use the old styling for the sake of retro-compatibility
{
const wchar_t *lexerName = ScintillaEditView::_langNameInfoArray[L_JS]._langName;
const wchar_t *lexerName = ScintillaEditView::_langNameInfoArray[L_JS_EMBEDDED]._langName;
LexerStyler *pOldStyler = (NppParameters::getInstance().getLStylerArray()).getLexerStylerByName(lexerName);
if (pOldStyler)
@ -1298,7 +1304,7 @@ void ScintillaEditView::setJsLexer()
execute(SCI_STYLESETEOLFILLED, SCE_C_COMMENT, true);
execute(SCI_STYLESETEOLFILLED, SCE_C_COMMENTDOC, true);
makeStyle(L_JS, pKwArray);
makeStyle(L_JS_EMBEDDED, pKwArray);
basic_string<char> keywordListInstruction("");
if (pKwArray[LANG_INDEX_INSTR])
@ -1306,7 +1312,7 @@ void ScintillaEditView::setJsLexer()
basic_string<wchar_t> kwlW = pKwArray[LANG_INDEX_INSTR];
keywordListInstruction = wstring2string(kwlW, CP_ACP);
}
const char *jsEmbeddedInstrs = getCompleteKeywordList(keywordListInstruction, L_JS, LANG_INDEX_INSTR);
const char *jsEmbeddedInstrs = getCompleteKeywordList(keywordListInstruction, L_JS_EMBEDDED, LANG_INDEX_INSTR);
execute(SCI_SETKEYWORDS, 0, reinterpret_cast<LPARAM>(jsEmbeddedInstrs));
}
@ -1819,7 +1825,7 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
case L_GOLANG:
setCppLexer(typeDoc); break;
case L_JS:
case L_JS_EMBEDDED:
case L_JAVASCRIPT:
setJsLexer(); break;
@ -1868,6 +1874,8 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
Style nfoStyle;
nfoStyle._styleID = STYLE_DEFAULT;
// Use Lucida Console as default font for ASCII Art, to have the best display effect
nfoStyle._fontName = L"Lucida Console";
nfoStyle._fontSize = 10;
@ -1878,6 +1886,19 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
{
nfoStyle._bgColor = pDefStyle->_bgColor;
nfoStyle._fgColor = pDefStyle->_fgColor;
// But if user changes it in stylers.xml or in theme's stylers XML file manually,
// let it be overrided.
if (!pDefStyle->_fontName.empty())
{
nfoStyle._fontName = pDefStyle->_fontName;
if (pDefStyle->_fontSize != STYLE_NOT_USED)
nfoStyle._fontSize = pDefStyle->_fontSize;
if (pDefStyle->_fontStyle != STYLE_NOT_USED)
nfoStyle._fontStyle = pDefStyle->_fontStyle;
}
nfoStyle._colorStyle = pDefStyle->_colorStyle;
}
}
@ -3126,8 +3147,7 @@ void ScintillaEditView::performGlobalStyles()
{
caretColor = pStyle->_fgColor;
}
//execute(SCI_SETCARETFORE, caretColor);
setElementColour(SC_ELEMENT_CARET, caretColor); // SCI_SETCARETFORE is deprecated
setElementColour(SC_ELEMENT_CARET, caretColor);
COLORREF multiEditCaretColor = darkGrey;
pStyle = stylers.findByName(L"Multi-edit carets color");
@ -3506,11 +3526,13 @@ void ScintillaEditView::updateLineNumberWidth()
const char * ScintillaEditView::getCompleteKeywordList(std::basic_string<char> & kwl, LangType langType, int keywordIndex)
{
kwl += " ";
const wchar_t *defKwl_generic = NppParameters::getInstance().getWordList(langType, keywordIndex);
WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance();
const char * defKwl = wmc.wchar2char(defKwl_generic, CP_ACP);
kwl += defKwl?defKwl:"";
const wchar_t* defKwl_generic = NppParameters::getInstance().getWordList(langType, keywordIndex);
if (defKwl_generic)
{
WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance();
const char* defKwl = wmc.wchar2char(defKwl_generic, CP_ACP);
kwl += defKwl ? defKwl : "";
}
return kwl.c_str();
}
@ -3897,15 +3919,19 @@ void ScintillaEditView::columnReplace(ColumnModeInfos & cmi, size_t initial, siz
//Defined in ScintillaEditView.h :
//const UCHAR MASK_FORMAT = 0x03;
UCHAR f = format & MASK_FORMAT;
bool useUppercase = false;
int base = 10;
if (f == BASE_16)
if (format == BASE_16)
base = 16;
else if (f == BASE_08)
else if (format == BASE_08)
base = 8;
else if (f == BASE_02)
else if (format == BASE_02)
base = 2;
else if (format == BASE_16_UPPERCASE)
{
base = 16;
useUppercase = true;
}
const int stringSize = 512;
char str[stringSize];
@ -3944,7 +3970,7 @@ void ScintillaEditView::columnReplace(ColumnModeInfos & cmi, size_t initial, siz
cmi[i]._selLpos += totalDiff;
cmi[i]._selRpos += totalDiff;
variedFormatNumber2String<char>(str, stringSize, numbers.at(i), base, kib, lead);
variedFormatNumber2String<char>(str, stringSize, numbers.at(i), base, useUppercase, kib, lead);
const bool hasVirtualSpc = cmi[i]._nbVirtualAnchorSpc > 0;
if (hasVirtualSpc) // if virtual space is present, then insert space
@ -4328,19 +4354,9 @@ void ScintillaEditView::setTabSettings(Lang* lang)
{
if (lang && lang->_tabSize != -1 && lang->_tabSize != 0)
{
if (lang->_langID == L_JAVASCRIPT)
{
Lang* ljs = NppParameters::getInstance().getLangFromID(L_JS);
execute(SCI_SETTABWIDTH, ljs->_tabSize > 0 ? ljs->_tabSize : lang->_tabSize);
execute(SCI_SETUSETABS, !ljs->_isTabReplacedBySpace);
execute(SCI_SETBACKSPACEUNINDENTS, ljs->_isBackspaceUnindent);
}
else
{
execute(SCI_SETTABWIDTH, lang->_tabSize);
execute(SCI_SETUSETABS, !lang->_isTabReplacedBySpace);
execute(SCI_SETBACKSPACEUNINDENTS, lang->_isBackspaceUnindent);
}
execute(SCI_SETTABWIDTH, lang->_tabSize);
execute(SCI_SETUSETABS, !lang->_isTabReplacedBySpace);
execute(SCI_SETBACKSPACEUNINDENTS, lang->_isBackspaceUnindent);
}
else
{

View File

@ -109,12 +109,7 @@ enum TextCase : UCHAR
RANDOMCASE
};
const UCHAR MASK_FORMAT = 0x03;
const UCHAR BASE_10 = 0x00; // Dec
const UCHAR BASE_16 = 0x01; // Hex
const UCHAR BASE_08 = 0x02; // Oct
const UCHAR BASE_02 = 0x03; // Bin
enum : UCHAR { BASE_10 = 0, BASE_16 = 1, BASE_08 = 2, BASE_02 = 3, BASE_16_UPPERCASE = 4 };
const int MARK_BOOKMARK = 20;
const int MARK_HIDELINESBEGIN = 19;
@ -252,7 +247,7 @@ const std::vector<std::vector<const char*>> g_nonPrintingChars =
size_t getNbDigits(size_t aNum, size_t base);
template<typename T>
T* variedFormatNumber2String(T* str, size_t strLen, size_t number, size_t base, size_t nbDigits, ColumnEditorParam::leadingChoice lead)
T* variedFormatNumber2String(T* str, size_t strLen, size_t number, size_t base, bool useUpper, size_t nbDigits, ColumnEditorParam::leadingChoice lead)
{
if (nbDigits == 0 || nbDigits >= strLen) return NULL;
@ -293,6 +288,8 @@ T* variedFormatNumber2String(T* str, size_t strLen, size_t number, size_t base,
else if (base == 16)
{
std::stringstream stream;
if (useUpper)
stream << std::uppercase;
stream << std::hex << number;
numberStr = stream.str();
}
@ -815,7 +812,7 @@ public:
bool isPythonStyleIndentation(LangType typeDoc) const{
return (typeDoc == L_PYTHON || typeDoc == L_COFFEESCRIPT || typeDoc == L_HASKELL ||\
typeDoc == L_C || typeDoc == L_CPP || typeDoc == L_OBJC || typeDoc == L_CS || typeDoc == L_JAVA ||\
typeDoc == L_PHP || typeDoc == L_JS || typeDoc == L_JAVASCRIPT || typeDoc == L_MAKEFILE ||\
typeDoc == L_PHP || typeDoc == L_JS_EMBEDDED || typeDoc == L_JAVASCRIPT || typeDoc == L_MAKEFILE ||\
typeDoc == L_ASN1 || typeDoc == L_GDSCRIPT);
};

View File

@ -42,21 +42,23 @@ void ColumnEditorDlg::display(bool toShow) const
intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
{
static HBRUSH hRedBrush = nullptr;
static int whichFlashRed = 0;
constexpr COLORREF rgbRed = RGB(255, 0, 0);
static HWND hCurrentBalloonTip = nullptr;
switch (message)
{
case WM_INITDIALOG :
{
hRedBrush = CreateSolidBrush(rgbRed); // Create red brush once
ColumnEditorParam colEditParam = NppParameters::getInstance()._columnEditParam;
NppDarkMode::autoSubclassAndThemeChildControls(_hSelf);
::SetDlgItemText(_hSelf, IDC_COL_TEXT_EDIT, colEditParam._insertedTextContent.c_str());
if (colEditParam._initialNum != -1)
::SetDlgItemInt(_hSelf, IDC_COL_INITNUM_EDIT, colEditParam._initialNum, FALSE);
if (colEditParam._increaseNum != -1)
::SetDlgItemInt(_hSelf, IDC_COL_INCREASENUM_EDIT, colEditParam._increaseNum, FALSE);
if (colEditParam._repeatNum != -1)
::SetDlgItemInt(_hSelf, IDC_COL_REPEATNUM_EDIT, colEditParam._repeatNum, FALSE);
setNumericFields(colEditParam);
::SendDlgItemMessage(_hSelf, IDC_COL_LEADING_COMBO, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(L"None"));
::SendDlgItemMessage(_hSelf, IDC_COL_LEADING_COMBO, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(L"Zeros"));
@ -72,15 +74,22 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
::SendMessage(::GetDlgItem(_hSelf, IDC_COL_LEADING_COMBO), CB_SETCURSEL, curSel, 0);
int format = IDC_COL_DEC_RADIO;
if (colEditParam._formatChoice == 1)
if ((colEditParam._formatChoice == BASE_16) || (colEditParam._formatChoice == BASE_16_UPPERCASE)) // either BASE_16 or BASE_16_UC
format = IDC_COL_HEX_RADIO;
else if (colEditParam._formatChoice == 2)
else if (colEditParam._formatChoice == BASE_08)
format = IDC_COL_OCT_RADIO;
else if (colEditParam._formatChoice == 3)
else if (colEditParam._formatChoice == BASE_02)
format = IDC_COL_BIN_RADIO;
::SendDlgItemMessage(_hSelf, format, BM_SETCHECK, TRUE, 0);
// populate the Hex-Case dropdown and activate correct case
::SendDlgItemMessage(_hSelf, IDC_COL_HEXUC_COMBO, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(L"a-f"));
::SendDlgItemMessage(_hSelf, IDC_COL_HEXUC_COMBO, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(L"A-F"));
UCHAR uc = (colEditParam._formatChoice == BASE_16_UPPERCASE) ? 1 : 0;
::SendDlgItemMessage(_hSelf, IDC_COL_HEXUC_COMBO, CB_SETCURSEL, uc, 0); // activate correct case
EnableWindow(GetDlgItem(_hSelf, IDC_COL_HEXUC_COMBO), format == IDC_COL_HEX_RADIO); // enable combobox only if hex is chosen
switchTo(colEditParam._mainChoice);
goToCenter(SWP_SHOWWINDOW | SWP_NOSIZE);
@ -89,6 +98,12 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
case WM_CTLCOLOREDIT:
{
int id = GetDlgCtrlID(reinterpret_cast<HWND>(lParam));
if (id == whichFlashRed)
{
SetBkColor((HDC)wParam, rgbRed);
return (LRESULT)hRedBrush;
}
return NppDarkMode::onCtlColorCtrl(reinterpret_cast<HDC>(wParam));
}
@ -152,25 +167,35 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
{
switch (LOWORD(wParam))
{
case IDCANCEL : // Close
display(false);
return TRUE;
case IDCANCEL: // in case of ESC keystroke
{
if (hCurrentBalloonTip && IsWindowVisible(hCurrentBalloonTip)) // if current baloon tip shown, just hide it
{
ShowWindow(hCurrentBalloonTip, SW_HIDE);
}
else // if current baloon tip doesn't show, we hide Column Editor dialog
{
display(false);
}
case IDOK :
{
return TRUE;
}
case IDOK:
{
(*_ppEditView)->execute(SCI_BEGINUNDOACTION);
constexpr int stringSize = 1024;
wchar_t str[stringSize]{};
bool isTextMode = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_COL_TEXT_RADIO, BM_GETCHECK, 0, 0));
if (isTextMode)
{
::SendDlgItemMessage(_hSelf, IDC_COL_TEXT_EDIT, WM_GETTEXT, stringSize, reinterpret_cast<LPARAM>(str));
display(false);
if ((*_ppEditView)->execute(SCI_SELECTIONISRECTANGLE) || (*_ppEditView)->execute(SCI_GETSELECTIONS) > 1)
{
ColumnModeInfos colInfos = (*_ppEditView)->getColumnModeSelectInfo();
@ -188,9 +213,9 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
auto endLine = (*_ppEditView)->execute(SCI_LINEFROMPOSITION, endPos);
constexpr int lineAllocatedLen = 1024;
wchar_t *line = new wchar_t[lineAllocatedLen];
wchar_t* line = new wchar_t[lineAllocatedLen];
for (size_t i = cursorLine ; i <= static_cast<size_t>(endLine); ++i)
for (size_t i = cursorLine; i <= static_cast<size_t>(endLine); ++i)
{
auto lineBegin = (*_ppEditView)->execute(SCI_POSITIONFROMLINE, i);
auto lineEnd = (*_ppEditView)->execute(SCI_GETLINEENDPOSITION, i);
@ -200,7 +225,7 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
if (lineLen > lineAllocatedLen)
{
delete [] line;
delete[] line;
line = new wchar_t[lineLen];
}
(*_ppEditView)->getGenericText(line, lineLen, lineBegin, lineEnd);
@ -218,19 +243,43 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
auto posRelative2Start = posAbs2Start - lineBegin;
if (posRelative2Start > static_cast<long long>(s2r.length()))
posRelative2Start = s2r.length();
s2r.insert(posRelative2Start, str);
}
(*_ppEditView)->replaceTarget(s2r.c_str(), lineBegin, lineEnd);
}
delete [] line;
delete[] line;
}
}
else
{
size_t initialNumber = ::GetDlgItemInt(_hSelf, IDC_COL_INITNUM_EDIT, NULL, TRUE);
size_t increaseNumber = ::GetDlgItemInt(_hSelf, IDC_COL_INCREASENUM_EDIT, NULL, TRUE);
size_t repeat = ::GetDlgItemInt(_hSelf, IDC_COL_REPEATNUM_EDIT, NULL, TRUE);
ColumnEditorParam colEditParam = NppParameters::getInstance()._columnEditParam;
::GetDlgItemText(_hSelf, IDC_COL_INITNUM_EDIT, str, stringSize);
int initialNumber = getNumericFieldValueFromText(colEditParam._formatChoice, str, stringSize);
if (initialNumber == -1)
{
whichFlashRed = sendValidationErrorMessage(IDC_COL_INITNUM_EDIT, colEditParam._formatChoice, str);
return TRUE;
}
::GetDlgItemText(_hSelf, IDC_COL_INCREASENUM_EDIT, str, stringSize);
int increaseNumber = getNumericFieldValueFromText(colEditParam._formatChoice, str, stringSize);
if (increaseNumber == -1)
{
whichFlashRed = sendValidationErrorMessage(IDC_COL_INCREASENUM_EDIT, colEditParam._formatChoice, str);
return TRUE;
}
::GetDlgItemText(_hSelf, IDC_COL_REPEATNUM_EDIT, str, stringSize);
int repeat = getNumericFieldValueFromText(colEditParam._formatChoice, str, stringSize);
if (repeat == -1)
{
whichFlashRed = sendValidationErrorMessage(IDC_COL_REPEATNUM_EDIT, colEditParam._formatChoice, str);
return TRUE;
}
if (repeat == 0)
{
repeat = 1; // Without this we might get an infinite loop while calculating the set "numbers" below.
@ -268,7 +317,7 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
const size_t kiMaxSize = 1 + (size_t)endLine - (size_t)cursorLine;
while (numbers.size() < kiMaxSize)
{
for (size_t i = 0; i < repeat; i++)
for (int i = 0; i < repeat; i++)
{
numbers.push_back(curNumber);
@ -279,17 +328,21 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
}
constexpr int lineAllocatedLen = 1024;
wchar_t *line = new wchar_t[lineAllocatedLen];
UCHAR f = format & MASK_FORMAT;
wchar_t* line = new wchar_t[lineAllocatedLen];
size_t base = 10;
if (f == BASE_16)
bool useUppercase = false;
if (format == BASE_16)
base = 16;
else if (f == BASE_08)
else if (format == BASE_08)
base = 8;
else if (f == BASE_02)
else if (format == BASE_02)
base = 2;
else if (format == BASE_16_UPPERCASE)
{
base = 16;
useUppercase = true;
}
size_t endNumber = *numbers.rbegin();
size_t nbEnd = getNbDigits(endNumber, base);
@ -297,7 +350,7 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
size_t nb = std::max<size_t>(nbInit, nbEnd);
for (size_t i = cursorLine ; i <= size_t(endLine) ; ++i)
for (size_t i = cursorLine; i <= size_t(endLine); ++i)
{
auto lineBegin = (*_ppEditView)->execute(SCI_POSITIONFROMLINE, i);
auto lineEnd = (*_ppEditView)->execute(SCI_GETLINEENDPOSITION, i);
@ -307,7 +360,7 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
if (lineLen > lineAllocatedLen)
{
delete [] line;
delete[] line;
line = new wchar_t[lineLen];
}
(*_ppEditView)->getGenericText(line, lineLen, lineBegin, lineEnd);
@ -317,7 +370,7 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
//
// Calcule wstring
//
variedFormatNumber2String<wchar_t>(str, stringSize, numbers.at(i - cursorLine), base, nb, getLeading());
variedFormatNumber2String<wchar_t>(str, stringSize, numbers.at(i - cursorLine), base, useUppercase, nb, getLeading());
if (lineEndCol < cursorCol)
{
@ -331,21 +384,21 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
auto posRelative2Start = posAbs2Start - lineBegin;
if (posRelative2Start > static_cast<long long>(s2r.length()))
posRelative2Start = s2r.length();
s2r.insert(posRelative2Start, str);
}
(*_ppEditView)->replaceTarget(s2r.c_str(), int(lineBegin), int(lineEnd));
}
delete [] line;
delete[] line;
}
}
(*_ppEditView)->execute(SCI_ENDUNDOACTION);
(*_ppEditView)->grabFocus();
return TRUE;
}
case IDC_COL_TEXT_RADIO :
case IDC_COL_NUM_RADIO :
(*_ppEditView)->grabFocus();
return TRUE;
}
case IDC_COL_TEXT_RADIO:
case IDC_COL_NUM_RADIO:
{
ColumnEditorParam& colEditParam = NppParameters::getInstance()._columnEditParam;
colEditParam._mainChoice = (wParam == IDC_COL_TEXT_RADIO) ? activeText : activeNumeric;
@ -359,13 +412,16 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
case IDC_COL_BIN_RADIO:
{
ColumnEditorParam& colEditParam = NppParameters::getInstance()._columnEditParam;
colEditParam._formatChoice = 0; // dec
if (wParam == IDC_COL_HEX_RADIO)
colEditParam._formatChoice = 1;
else if (wParam == IDC_COL_OCT_RADIO)
colEditParam._formatChoice = 2;
else if (wParam == IDC_COL_BIN_RADIO)
colEditParam._formatChoice = 3;
colEditParam._formatChoice = BASE_10; // dec
if (LOWORD(wParam) == IDC_COL_HEX_RADIO)
colEditParam._formatChoice = getHexCase(); // will pick appropriate UC or LC version of hex
else if (LOWORD(wParam) == IDC_COL_OCT_RADIO)
colEditParam._formatChoice = BASE_08;
else if (LOWORD(wParam) == IDC_COL_BIN_RADIO)
colEditParam._formatChoice = BASE_02;
setNumericFields(colEditParam); // reformat the field text to be based on the new radix
EnableWindow(GetDlgItem(_hSelf, IDC_COL_HEXUC_COMBO), LOWORD(wParam) == IDC_COL_HEX_RADIO); // enable combobox only if hex is chosen
return TRUE;
}
@ -399,7 +455,14 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
return TRUE;
}
int num = ::GetDlgItemInt(_hSelf, LOWORD(wParam), NULL, TRUE);
int num = getNumericFieldValueFromText(colEditParam._formatChoice, str, stringSize);
if (num == -1)
{
num = colEditParam._initialNum;
setNumericFields(colEditParam); // reformat the strings to eliminate error
whichFlashRed = sendValidationErrorMessage(LOWORD(wParam), colEditParam._formatChoice, str);
}
colEditParam._initialNum = num;
return TRUE;
}
@ -413,7 +476,14 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
return TRUE;
}
int num = ::GetDlgItemInt(_hSelf, LOWORD(wParam), NULL, TRUE);
int num = getNumericFieldValueFromText(colEditParam._formatChoice, str, stringSize);
if (num == -1)
{
num = colEditParam._increaseNum;
setNumericFields(colEditParam); // reformat the strings to eliminate error
whichFlashRed = sendValidationErrorMessage(LOWORD(wParam), colEditParam._formatChoice, str);
}
colEditParam._increaseNum = num;
return TRUE;
}
@ -427,7 +497,14 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
return TRUE;
}
int num = ::GetDlgItemInt(_hSelf, LOWORD(wParam), NULL, TRUE);
int num = getNumericFieldValueFromText(colEditParam._formatChoice, str, stringSize);
if (num == -1)
{
num = colEditParam._repeatNum;
setNumericFields(colEditParam); // reformat the strings to eliminate error
whichFlashRed = sendValidationErrorMessage(LOWORD(wParam), colEditParam._formatChoice, str);
}
colEditParam._repeatNum = num;
return TRUE;
}
@ -443,6 +520,15 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
colEditParam._leadingChoice = getLeading();
return TRUE;
}
else if(LOWORD(wParam) == IDC_COL_HEXUC_COMBO)
{
ColumnEditorParam& colEditParam = NppParameters::getInstance()._columnEditParam;
if ((colEditParam._formatChoice & BASE_16) == BASE_16 )
colEditParam._formatChoice = getHexCase();
setNumericFields(colEditParam); // want the GUI fields to update case when combobox changes
return TRUE;
}
}
break;
}
@ -452,6 +538,51 @@ intptr_t CALLBACK ColumnEditorDlg::run_dlgProc(UINT message, WPARAM wParam, LPAR
break;
}
case WM_TIMER:
{
static int idRedraw = 0;
if (wParam == IDT_COL_FLASH_TIMER)
{
KillTimer(_hSelf, IDT_COL_FLASH_TIMER);
idRedraw = whichFlashRed; // keep the ID for the one whose flash is ending...
whichFlashRed = 0; // must be 0 before the redraw, otherwise it will maintain color
redrawDlgItem(idRedraw, true); // redraw the just the one that was flashed
// Remember the latest/current baloon tip handle
hCurrentBalloonTip = [](HWND hEditControl) -> HWND {
HWND hTooltip = FindWindowEx(NULL, NULL, L"tooltips_class32", NULL);
while (hTooltip)
{
HWND hParent = GetParent(hTooltip);
if (hParent == hEditControl || hParent == GetParent(hEditControl))
{
return hTooltip;
}
hTooltip = FindWindowEx(NULL, hTooltip, L"tooltips_class32", NULL);
}
return NULL;
}(GetDlgItem(_hSelf, idRedraw));
}
if (wParam == IDC_COL_BALLONTIP_TIMER)
{
KillTimer(_hSelf, IDC_COL_BALLONTIP_TIMER);
SendMessage(GetDlgItem(_hSelf, idRedraw), EM_HIDEBALLOONTIP, 0, 0);
}
break;
}
case WM_DESTROY:
{
DeleteObject(hRedBrush);
break;
}
default :
return FALSE;
}
@ -492,16 +623,23 @@ void ColumnEditorDlg::switchTo(bool toText)
UCHAR ColumnEditorDlg::getFormat()
{
UCHAR f = 0; // Dec by default
UCHAR f = BASE_10; // Dec by default
if (isCheckedOrNot(IDC_COL_HEX_RADIO))
f = 1;
f = getHexCase(); // will give BASE_16 or BASE_16_UC, depending on case selector
else if (isCheckedOrNot(IDC_COL_OCT_RADIO))
f = 2;
f = BASE_08;
else if (isCheckedOrNot(IDC_COL_BIN_RADIO))
f = 3;
f = BASE_02;
return f;
}
UCHAR ColumnEditorDlg::getHexCase(void)
{
int curSel = static_cast<int>(::SendDlgItemMessage(_hSelf, IDC_COL_HEXUC_COMBO, CB_GETCURSEL, 0, 0));
return (curSel == 1) ? BASE_16_UPPERCASE : BASE_16;
}
ColumnEditorParam::leadingChoice ColumnEditorDlg::getLeading()
{
ColumnEditorParam::leadingChoice leading = ColumnEditorParam::noneLeading;
@ -527,3 +665,147 @@ ColumnEditorParam::leadingChoice ColumnEditorDlg::getLeading()
}
return leading;
}
void ColumnEditorDlg::setNumericFields(const ColumnEditorParam& colEditParam)
{
if (colEditParam._formatChoice == BASE_10)
{
if (colEditParam._initialNum != -1)
::SetDlgItemInt(_hSelf, IDC_COL_INITNUM_EDIT, colEditParam._initialNum, FALSE);
else
::SetDlgItemText(_hSelf, IDC_COL_INITNUM_EDIT, L"");
if (colEditParam._increaseNum != -1)
::SetDlgItemInt(_hSelf, IDC_COL_INCREASENUM_EDIT, colEditParam._increaseNum, FALSE);
else
::SetDlgItemText(_hSelf, IDC_COL_INCREASENUM_EDIT, L"");
if (colEditParam._repeatNum != -1)
::SetDlgItemInt(_hSelf, IDC_COL_REPEATNUM_EDIT, colEditParam._repeatNum, FALSE);
else
::SetDlgItemText(_hSelf, IDC_COL_REPEATNUM_EDIT, L"");
}
else
{
size_t base = 10;
switch (colEditParam._formatChoice)
{
case BASE_16: // hex
case BASE_16_UPPERCASE: // or hex w/ uppercase A-F
base = 16;
break;
case BASE_08: // oct
base = 8;
break;
case BASE_02: // bin
base = 2;
break;
default:
base = 10;
break;
}
bool useUpper = (colEditParam._formatChoice == BASE_16_UPPERCASE);
constexpr int stringSize = 1024;
wchar_t str[stringSize]{};
if (colEditParam._initialNum != -1)
{
variedFormatNumber2String<wchar_t>(str, stringSize, colEditParam._initialNum, base, useUpper, getNbDigits(colEditParam._initialNum, base), getLeading());
::SetDlgItemText(_hSelf, IDC_COL_INITNUM_EDIT, str);
}
else
::SetDlgItemText(_hSelf, IDC_COL_INITNUM_EDIT, L"");
if (colEditParam._increaseNum != -1)
{
variedFormatNumber2String<wchar_t>(str, stringSize, colEditParam._increaseNum, base, useUpper, getNbDigits(colEditParam._increaseNum, base), getLeading());
::SetDlgItemText(_hSelf, IDC_COL_INCREASENUM_EDIT, str);
}
else
::SetDlgItemText(_hSelf, IDC_COL_INCREASENUM_EDIT, L"");
if (colEditParam._repeatNum != -1)
{
variedFormatNumber2String<wchar_t>(str, stringSize, colEditParam._repeatNum, base, useUpper, getNbDigits(colEditParam._repeatNum, base), getLeading());
::SetDlgItemText(_hSelf, IDC_COL_REPEATNUM_EDIT, str);
}
else
::SetDlgItemText(_hSelf, IDC_COL_REPEATNUM_EDIT, L"");
}
return;
}
// Convert the string to an integer, depending on base
int ColumnEditorDlg::getNumericFieldValueFromText(int formatChoice, wchar_t str[], size_t /*stringSize*/)
{
int num = 0;
int base = 0;
switch (formatChoice)
{
case BASE_16:
case BASE_16_UPPERCASE:
base = 16;
break;
case BASE_08:
base = 8;
break;
case BASE_02:
base = 2;
break;
default:
base = 10;
break;
}
// convert string in base to int value; on error, return -1
wchar_t* pEnd = nullptr;
num = static_cast<int>(std::wcstol(str, &pEnd, base));
if (pEnd == nullptr || *pEnd != L'\0')
{
return -1;
}
return num;
}
int ColumnEditorDlg::sendValidationErrorMessage(int whichFlashRed, int formatChoice, wchar_t str[])
{
wchar_t wcMsg[1024];
const wchar_t *wcRadixNote;
EDITBALLOONTIP ebt;
ebt.cbStruct = sizeof(EDITBALLOONTIP);
ebt.pszTitle = L"Invalid Numeric Entry";
switch (formatChoice)
{
case BASE_16:
case BASE_16_UPPERCASE:
wcRadixNote = L"Hex numbers use 0-9, A-F!";
break;
case BASE_08:
wcRadixNote = L"Oct numbers only use 0-7!";
break;
case BASE_02:
wcRadixNote = L"Bin numbers only use 0-1!";
break;
default:
wcRadixNote = L"Decimal numbers only use 0-9!";
break;
}
if (str[0])
{
swprintf_s(wcMsg, L"Entered string \"%s\":\r\n%s", str, wcRadixNote);
ebt.pszText = wcMsg;
}
ebt.ttiIcon = TTI_ERROR_LARGE; // tooltip icon
SendMessage(GetDlgItem(_hSelf, whichFlashRed), EM_SHOWBALLOONTIP, 0, (LPARAM)&ebt);
SetTimer(_hSelf, IDT_COL_FLASH_TIMER, 250, NULL);
SetTimer(_hSelf, IDC_COL_BALLONTIP_TIMER, 3500, NULL);
redrawDlgItem(whichFlashRed);
return whichFlashRed;
}

View File

@ -45,10 +45,14 @@ public :
void switchTo(bool toText);
UCHAR getFormat();
ColumnEditorParam::leadingChoice getLeading();
UCHAR getHexCase(void);
protected :
intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
private :
ScintillaEditView **_ppEditView = nullptr;
void setNumericFields(const ColumnEditorParam& colEditParam);
int getNumericFieldValueFromText(int formatChoice, wchar_t str[], size_t stringSize);
int sendValidationErrorMessage(int whichFlashRed, int formatChoice, wchar_t str[]);
};

View File

@ -25,27 +25,28 @@ EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Column / Multi-Selection Editor"
FONT 8, L"MS Shell Dlg", 0, 0, 0x0
BEGIN
CONTROL "&Text to Insert",IDC_COL_TEXT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,13,6,124,10
CONTROL "&Number to Insert",IDC_COL_NUM_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP | WS_GROUP,13,68,204,10
CONTROL "&Text to Insert",IDC_COL_TEXT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,13,6,124,10
CONTROL "&Number to Insert",IDC_COL_NUM_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,13,68,204,10
GROUPBOX "",IDC_COL_TEXT_GRP_STATIC,8,14,124,46
EDITTEXT IDC_COL_TEXT_EDIT,20,32,97,12,ES_AUTOHSCROLL
GROUPBOX "",IDC_COL_NUM_GRP_STATIC,8,77,204,130
RTEXT "&Initial number:",IDC_COL_INITNUM_STATIC,10,89,76,8
EDITTEXT IDC_COL_INITNUM_EDIT,90,87,38,12,ES_NUMBER
RTEXT "Increase b&y:",IDC_COL_INCRNUM_STATIC,10,106,75,8
EDITTEXT IDC_COL_INCREASENUM_EDIT,90,104,38,12,ES_NUMBER
RTEXT "&Repeat:",IDC_COL_REPEATNUM_STATIC,10,123,75,8
EDITTEXT IDC_COL_REPEATNUM_EDIT,90,121,38,12,ES_NUMBER
RTEXT "&Leading:",IDC_COL_LEADING_STATIC,10,140,75,8
COMBOBOX IDC_COL_LEADING_COMBO,90,138,100,30,CBS_DROPDOWNLIST | WS_TABSTOP
GROUPBOX "Format",IDC_COL_FORMAT_GRP_STATIC,16,86,188,44,BS_CENTER
CONTROL "&Dec",IDC_COL_DEC_RADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,27,99,50,10
CONTROL "&Hex",IDC_COL_HEX_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,110,99,50,10
CONTROL "&Oct",IDC_COL_OCT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,27,114,50,10
CONTROL "&Bin",IDC_COL_BIN_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,110,114,50,10
COMBOBOX IDC_COL_HEXUC_COMBO,150,97,40,10,CBS_DROPDOWNLIST | WS_TABSTOP
GROUPBOX "Format",IDC_COL_FORMAT_GRP_STATIC,16,155,188,44,BS_CENTER
CONTROL "&Dec",IDC_COL_DEC_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,27,168,70,10
CONTROL "&Hex",IDC_COL_HEX_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,122,168,70,10
CONTROL "&Oct",IDC_COL_OCT_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,27,183,70,10
CONTROL "&Bin",IDC_COL_BIN_RADIO,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,122,183,70,10
GROUPBOX "",IDC_COL_NUM_GRP_STATIC,8,77,204,130
RTEXT "&Initial number:",IDC_COL_INITNUM_STATIC,10,140,76,8
EDITTEXT IDC_COL_INITNUM_EDIT,90,138,38,12
RTEXT "Increase b&y:",IDC_COL_INCRNUM_STATIC,10,157,75,8
EDITTEXT IDC_COL_INCREASENUM_EDIT,90,155,38,12
RTEXT "&Repeat:",IDC_COL_REPEATNUM_STATIC,10,174,75,8
EDITTEXT IDC_COL_REPEATNUM_EDIT,90,172,38,12
RTEXT "&Leading:",IDC_COL_LEADING_STATIC,10,191,75,8
COMBOBOX IDC_COL_LEADING_COMBO,90,189,100,30,CBS_DROPDOWNLIST | WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,142,18,70,14
PUSHBUTTON "Cancel",IDCANCEL,142,36,70,14

View File

@ -37,4 +37,7 @@
#define IDC_COL_REPEATNUM_EDIT (IDD_COLUMNEDIT + 17)
#define IDC_COL_LEADING_STATIC (IDD_COLUMNEDIT + 18)
#define IDC_COL_LEADING_COMBO (IDD_COLUMNEDIT + 19)
#define IDC_COL_HEXUC_COMBO (IDD_COLUMNEDIT + 20)
#define IDT_COL_FLASH_TIMER (IDD_COLUMNEDIT + 21)
#define IDC_COL_BALLONTIP_TIMER (IDD_COLUMNEDIT + 22)
#endif// COLUMNEDITOR_RC_H

View File

@ -292,6 +292,7 @@ Utf8_16_Write::Utf8_16_Write()
m_pNewBuf = NULL;
m_bFirstWrite = true;
m_nBufSize = 0;
m_dwLastFileError = NO_ERROR;
}
Utf8_16_Write::~Utf8_16_Write()
@ -301,11 +302,14 @@ Utf8_16_Write::~Utf8_16_Write()
bool Utf8_16_Write::openFile(const wchar_t *name)
{
m_pFile = std::make_unique<Win32_IO_File>(name);
m_dwLastFileError = NO_ERROR;
m_pFile = std::make_unique<Win32_IO_File>(name);
if (!m_pFile)
return false;
m_dwLastFileError = m_pFile->getLastErrorCode();
if (!m_pFile->isOpened())
{
m_pFile = nullptr;
@ -319,78 +323,85 @@ bool Utf8_16_Write::openFile(const wchar_t *name)
bool Utf8_16_Write::writeFile(const void* p, size_t _size)
{
// no file open
m_dwLastFileError = NO_ERROR;
// no file open
if (!m_pFile)
{
return false;
}
if (m_bFirstWrite)
{
switch (m_eEncoding)
{
case uniUTF8:
{
switch (m_eEncoding)
{
case uniUTF8:
{
if (!m_pFile->write(k_Boms[m_eEncoding], 3))
return false;
}
break;
case uni16BE:
case uni16LE:
{
if (!m_pFile->write(k_Boms[m_eEncoding], 2))
if (!m_pFile->write(k_Boms[m_eEncoding], 3))
{
m_dwLastFileError = m_pFile->getLastErrorCode();
return false;
}
}
break;
default:
case uni16BE:
case uni16LE:
{
if (!m_pFile->write(k_Boms[m_eEncoding], 2))
{
m_dwLastFileError = m_pFile->getLastErrorCode();
return false;
}
}
break;
default:
{
// nothing to do
}
break;
}
}
m_bFirstWrite = false;
}
}
bool isOK = false;
bool isOK = false;
switch (m_eEncoding)
{
switch (m_eEncoding)
{
case uni7Bit:
case uni8Bit:
case uniCookie:
case uniUTF8:
case uni8Bit:
case uniCookie:
case uniUTF8:
{
// Normal write
// Normal write
if (m_pFile->write(p, _size))
isOK = true;
}
m_dwLastFileError = m_pFile->getLastErrorCode();
}
break;
case uni16BE_NoBOM:
case uni16LE_NoBOM:
case uni16BE:
case uni16LE:
case uni16BE_NoBOM:
case uni16LE_NoBOM:
case uni16BE:
case uni16LE:
{
static const unsigned int bufSize = 64*1024;
static const unsigned int bufSize = 64 * 1024;
utf16* buf = new utf16[bufSize];
Utf8_Iter iter8;
iter8.set(static_cast<const ubyte*>(p), _size, m_eEncoding);
Utf8_Iter iter8;
iter8.set(static_cast<const ubyte*>(p), _size, m_eEncoding);
unsigned int bufIndex = 0;
while (iter8)
{
++iter8;
while ((bufIndex < bufSize) && iter8.canGet())
iter8.get(&buf [bufIndex++]);
iter8.get(&buf[bufIndex++]);
if (bufIndex == bufSize || !iter8)
{
if (!m_pFile->write(buf, bufIndex * sizeof(utf16)))
{
m_dwLastFileError = m_pFile->getLastErrorCode();
delete[] buf;
return 0;
}
@ -399,15 +410,14 @@ bool Utf8_16_Write::writeFile(const void* p, size_t _size)
}
isOK = true;
delete[] buf;
}
}
break;
default:
break;
}
return isOK;
default:
break;
}
return isOK;
}
@ -506,7 +516,15 @@ void Utf8_16_Write::closeFile()
}
if (m_pFile)
{
m_pFile->close(); // explicit closing for getting the possible flushing/closing error code
m_dwLastFileError = m_pFile->getLastErrorCode();
m_pFile = nullptr;
}
else
{
m_dwLastFileError = NO_ERROR;
}
}

View File

@ -148,11 +148,14 @@ public:
size_t convert(char* p, size_t _size);
char* getNewBuf() { return reinterpret_cast<char*>(m_pNewBuf); }
DWORD getLastFileErrorState() { return m_dwLastFileError; }
protected:
UniMode m_eEncoding;
std::unique_ptr<Win32_IO_File> m_pFile;
ubyte* m_pNewBuf;
size_t m_nBufSize;
bool m_bFirstWrite;
DWORD m_dwLastFileError;
};

View File

@ -35,7 +35,7 @@ using namespace std;
// local DebugInfo helper
void AppendDisplayAdaptersInfo(wstring& strOut, const unsigned int maxAdaptersIn)
{
strOut += L"\n installed Display Class adapters: ";
strOut += L"\r\n installed Display Class adapters: ";
const wchar_t wszRegDisplayClassWinNT[] = L"SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}";
HKEY hkDisplayClass = nullptr;
@ -43,7 +43,7 @@ void AppendDisplayAdaptersInfo(wstring& strOut, const unsigned int maxAdaptersIn
KEY_ENUMERATE_SUB_KEYS | KEY_QUERY_VALUE, &hkDisplayClass);
if ((lStatus != ERROR_SUCCESS) || !hkDisplayClass)
{
strOut += L"\n - error, failed to open the Registry Display Class key!";
strOut += L"\r\n - error, failed to open the Registry Display Class key!";
return;
}
@ -57,7 +57,7 @@ void AppendDisplayAdaptersInfo(wstring& strOut, const unsigned int maxAdaptersIn
{
if (dwAdapterSubkeysFound >= maxAdaptersIn)
{
strOut += L"\n - warning, search has been limited to maximum number of adapter records: "
strOut += L"\r\n - warning, search has been limited to maximum number of adapter records: "
+ std::to_wstring(maxAdaptersIn);
break;
}
@ -69,7 +69,7 @@ void AppendDisplayAdaptersInfo(wstring& strOut, const unsigned int maxAdaptersIn
lStatus = ::RegOpenKeyExW(HKEY_LOCAL_MACHINE, strAdapterSubKey.c_str(), 0, KEY_READ, &hkAdapterSubKey);
if ((lStatus == ERROR_SUCCESS) && hkAdapterSubKey)
{
strAdapterNo.insert(0, L"\n "); // doubling the output indentation
strAdapterNo.insert(0, L"\r\n "); // doubling the output indentation
const unsigned int nKeyValMaxLen = 127;
const DWORD dwKeyValMaxSize = nKeyValMaxLen * sizeof(wchar_t);
wchar_t wszKeyVal[nKeyValMaxLen + 1]{}; // +1 ... to ensure NUL termination
@ -235,7 +235,6 @@ void AboutDlg::doDialog()
goToCenter(SWP_SHOWWINDOW | SWP_NOSIZE);
}
intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
@ -253,7 +252,7 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
_debugInfoStr += L"\r\n";
// Build time
_debugInfoStr += L"Build time : ";
_debugInfoStr += L"Build time: ";
wstring buildTime;
WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance();
buildTime += wmc.char2wchar(__DATE__, CP_ACP);
@ -263,19 +262,19 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
_debugInfoStr += L"\r\n";
#if defined(__clang__)
_debugInfoStr += L"Built with : Clang ";
_debugInfoStr += L"Built with: Clang ";
_debugInfoStr += wmc.char2wchar(__clang_version__, CP_ACP);
_debugInfoStr += L"\r\n";
#elif defined(__GNUC__)
_debugInfoStr += L"Built with : GCC ";
_debugInfoStr += L"Built with: GCC ";
_debugInfoStr += wmc.char2wchar(__VERSION__, CP_ACP);
_debugInfoStr += L"\r\n";
#elif !defined(_MSC_VER)
_debugInfoStr += L"Built with : (unknown)\r\n";
_debugInfoStr += L"Built with: (unknown)\r\n";
#endif
// Scintilla/Lexilla version
_debugInfoStr += L"Scintilla/Lexilla included : ";
_debugInfoStr += L"Scintilla/Lexilla included: ";
{
string strSciLexVer = NPP_SCINTILLA_VERSION;
strSciLexVer += "/";
@ -285,12 +284,12 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
_debugInfoStr += L"\r\n";
// Boost Regex version
_debugInfoStr += L"Boost Regex included : ";
_debugInfoStr += L"Boost Regex included: ";
_debugInfoStr += wmc.char2wchar(NPP_BOOST_REGEX_VERSION, CP_ACP);
_debugInfoStr += L"\r\n";
// Binary path
_debugInfoStr += L"Path : ";
_debugInfoStr += L"Path: ";
wchar_t nppFullPath[MAX_PATH]{};
::GetModuleFileName(NULL, nppFullPath, MAX_PATH);
_debugInfoStr += nppFullPath;
@ -298,39 +297,39 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
// Command line as specified for program launch
// The _cmdLinePlaceHolder will be replaced later by refreshDebugInfo()
_debugInfoStr += L"Command Line : ";
_debugInfoStr += L"Command Line: ";
_debugInfoStr += _cmdLinePlaceHolder;
_debugInfoStr += L"\r\n";
// Administrator mode
_debugInfoStr += L"Admin mode : ";
_debugInfoStr += L"Admin mode: ";
_debugInfoStr += _isAdmin ? L"ON" : L"OFF";
_debugInfoStr += L"\r\n";
// local conf
_debugInfoStr += L"Local Conf mode : ";
_debugInfoStr += L"Local Conf mode: ";
bool doLocalConf = (NppParameters::getInstance()).isLocal();
_debugInfoStr += doLocalConf ? L"ON" : L"OFF";
_debugInfoStr += L"\r\n";
// Cloud config directory
_debugInfoStr += L"Cloud Config : ";
_debugInfoStr += L"Cloud Config: ";
const wstring& cloudPath = nppParam.getNppGUI()._cloudPath;
_debugInfoStr += cloudPath.empty() ? L"OFF" : cloudPath;
_debugInfoStr += L"\r\n";
// Periodic Backup
_debugInfoStr += L"Periodic Backup : ";
_debugInfoStr += L"Periodic Backup: ";
_debugInfoStr += nppGui.isSnapshotMode() ? L"ON" : L"OFF";
_debugInfoStr += L"\r\n";
// Placeholders
_debugInfoStr += L"Placeholders : ";
_debugInfoStr += L"Placeholders: ";
_debugInfoStr += nppGui._keepSessionAbsentFileEntries ? L"ON" : L"OFF";
_debugInfoStr += L"\r\n";
// SC_TECHNOLOGY
_debugInfoStr += L"Scintilla Rendering Mode : ";
_debugInfoStr += L"Scintilla Rendering Mode: ";
switch (nppGui._writeTechnologyEngine)
{
case defaultTechnology:
@ -357,7 +356,7 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
_debugInfoStr += L"\r\n";
// Multi-instance
_debugInfoStr += L"Multi-instance Mode : ";
_debugInfoStr += L"Multi-instance Mode: ";
switch (nppGui._multiInstSetting)
{
case monoInst:
@ -374,8 +373,13 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
}
_debugInfoStr += L"\r\n";
// asNotepad
_debugInfoStr += L"asNotepad: ";
_debugInfoStr += nppParam.isAsNotepadStyle() ? L"ON" : L"OFF";
_debugInfoStr += L"\r\n";
// File Status Auto-Detection
_debugInfoStr += L"File Status Auto-Detection : ";
_debugInfoStr += L"File Status Auto-Detection: ";
if (nppGui._fileAutoDetection == cdDisabled)
{
_debugInfoStr += L"cdDisabled";
@ -397,23 +401,23 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
_debugInfoStr += L"\r\n";
// Dark Mode
_debugInfoStr += L"Dark Mode : ";
_debugInfoStr += L"Dark Mode: ";
_debugInfoStr += nppGui._darkmode._isEnabled ? L"ON" : L"OFF";
_debugInfoStr += L"\r\n";
// Display Info
_debugInfoStr += L"Display Info : ";
_debugInfoStr += L"Display Info:";
{
HDC hdc = ::GetDC(nullptr); // desktop DC
if (hdc)
{
_debugInfoStr += L"\n primary monitor: " + std::to_wstring(::GetDeviceCaps(hdc, HORZRES));
_debugInfoStr += L"\r\n primary monitor: " + std::to_wstring(::GetDeviceCaps(hdc, HORZRES));
_debugInfoStr += L"x" + std::to_wstring(::GetDeviceCaps(hdc, VERTRES));
_debugInfoStr += L", scaling " + std::to_wstring(::GetDeviceCaps(hdc, LOGPIXELSX) * 100 / 96);
_debugInfoStr += L"%";
::ReleaseDC(nullptr, hdc);
}
_debugInfoStr += L"\n visible monitors count: " + std::to_wstring(::GetSystemMetrics(SM_CMONITORS));
_debugInfoStr += L"\r\n visible monitors count: " + std::to_wstring(::GetSystemMetrics(SM_CMONITORS));
AppendDisplayAdaptersInfo(_debugInfoStr, 4); // survey up to 4 potential graphics card Registry records
}
_debugInfoStr += L"\r\n";
@ -486,7 +490,7 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
}
}
_debugInfoStr += L"OS Name : ";
_debugInfoStr += L"OS Name: ";
_debugInfoStr += szProductName;
_debugInfoStr += L" (";
_debugInfoStr += (NppParameters::getInstance()).getWinVerBitStr();
@ -495,14 +499,14 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
if (szReleaseId[0] != '\0')
{
_debugInfoStr += L"OS Version : ";
_debugInfoStr += L"OS Version: ";
_debugInfoStr += szReleaseId;
_debugInfoStr += L"\r\n";
}
if (szCurrentBuildNumber[0] != '\0')
{
_debugInfoStr += L"OS Build : ";
_debugInfoStr += L"OS Build: ";
_debugInfoStr += szCurrentBuildNumber;
_debugInfoStr += L".";
_debugInfoStr += szUBR;
@ -513,7 +517,7 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
constexpr size_t bufSizeACP = 32;
wchar_t szACP[bufSizeACP] = { '\0' };
swprintf(szACP, bufSizeACP, L"%u", ::GetACP());
_debugInfoStr += L"Current ANSI codepage : ";
_debugInfoStr += L"Current ANSI codepage: ";
_debugInfoStr += szACP;
_debugInfoStr += L"\r\n";
}
@ -538,7 +542,7 @@ intptr_t CALLBACK DebugInfoDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
}
// Plugins
_debugInfoStr += L"Plugins : ";
_debugInfoStr += L"Plugins: ";
_debugInfoStr += _loadedPlugins.length() == 0 ? L"none" : _loadedPlugins;
_debugInfoStr += L"\r\n";

View File

@ -295,7 +295,8 @@ intptr_t CALLBACK ClipboardHistoryPanel::run_dlgProc(UINT message, WPARAM wParam
catch (...)
{
MessageBox(_hSelf, L"Cannot process this clipboard data in the history:\nThe data is too large to be treated.", L"Clipboard problem", MB_OK | MB_APPLMODAL);
delete[] c;
if (c)
delete[] c;
}
}
}

View File

@ -106,8 +106,9 @@ intptr_t CALLBACK ColourPopup::run_dlgProc(UINT message, WPARAM wParam, LPARAM l
int nColor;
for (nColor = 0 ; nColor < int(sizeof(colourItems)/sizeof(DWORD)) ; ++nColor)
{
::SendDlgItemMessage(_hSelf, IDC_COLOUR_LIST, LB_ADDSTRING, nColor, reinterpret_cast<LPARAM>(""));
::SendDlgItemMessage(_hSelf, IDC_COLOUR_LIST, LB_SETITEMDATA, nColor, static_cast<LPARAM>(colourItems[nColor]));
auto i = ::SendDlgItemMessage(_hSelf, IDC_COLOUR_LIST, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(""));
if (i != LB_ERR)
::SendDlgItemMessage(_hSelf, IDC_COLOUR_LIST, LB_SETITEMDATA, nColor, static_cast<LPARAM>(colourItems[nColor]));
}
return TRUE;
}

View File

@ -1022,7 +1022,9 @@ void WordStyleDlg::setStyleListFromLexer(int index)
const wchar_t *langName = _lsArray.getLexerNameFromIndex(index - 1);
const wchar_t *ext = NppParameters::getInstance().getLangExtFromName(langName);
const wchar_t *userExt = (_lsArray.getLexerStylerByName(langName))->getLexerUserExt();
::SendDlgItemMessage(_hSelf, IDC_DEF_EXT_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(ext));
if (ext)
::SendDlgItemMessage(_hSelf, IDC_DEF_EXT_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(ext));
// WM_SETTEXT cause sending WM_COMMAND message with EN_CHANGE.
// That makes status dirty, even it shouldn't in this case.
@ -1101,10 +1103,15 @@ std::pair<intptr_t, intptr_t> WordStyleDlg::goToPreferencesSettings()
result.first = edit1;
result.second = IDC_RADIO_CLM_HILITE;
}
else if (style._styleDesc == L"Multi-edit carets color" || style._styleDesc == L"Multi-selected text color")
{
result.first = edit2;
result.second = IDC_CHECK_MULTISELECTION;
}
else if (style._styleDesc == L"Caret colour")
{
result.first = edit1;
result.second = IDC_WIDTH_COMBO;
result.second = IDC_CARETSETTING_STATIC;
}
else if (style._styleDesc == L"Edge colour")
{
@ -1126,12 +1133,12 @@ std::pair<intptr_t, intptr_t> WordStyleDlg::goToPreferencesSettings()
|| style._styleDesc == L"Change History saved")
{
result.first = margins;
result.second = IDC_CHECK_CHANGHISTORYMARGIN;
result.second = IDC_GB_CHANGHISTORY;
}
else if (style._styleDesc == L"Fold" || style._styleDesc == L"Fold active" || style._styleDesc == L"Fold margin")
{
result.first = margins;
result.second = IDC_RADIO_BOX;
result.second = IDC_FMS_GB_STATIC;
}
else if (style._styleDesc == L"Smart Highlighting")
{
@ -1152,7 +1159,7 @@ std::pair<intptr_t, intptr_t> WordStyleDlg::goToPreferencesSettings()
|| style._styleDesc == L"Mark Style 4" || style._styleDesc == L"Mark Style 5")
{
result.first = highlighting;
result.second = IDC_CHECK_MARKALLCASESENSITIVE;
result.second = IDC_MARKALL_STATIC;
}
else if (style._styleDesc == L"URL hovered")
{
@ -1164,6 +1171,11 @@ std::pair<intptr_t, intptr_t> WordStyleDlg::goToPreferencesSettings()
result.first = edit2;
result.second = IDC_CHECK_WITHCUSTOMCOLOR_CRLF;
}
else if (style._styleDesc == L"Active tab focused indicator" || style._styleDesc == L"Active tab unfocused indicator")
{
result.first = tabbar;
result.second = IDC_CHECK_ORANGE;
}
else if (style._styleDesc == L"Inactive tabs")
{
result.first = tabbar;

View File

@ -367,7 +367,7 @@ void FunctionListPanel::reload()
Buffer* currentBuf = (*_ppEditView)->getCurrentBuffer();
const wchar_t *fn = currentBuf->getFileName();
LangType langID = currentBuf->getLangType();
if (langID == L_JS)
if (langID == L_JS_EMBEDDED)
langID = L_JAVASCRIPT;
const wchar_t *udln = NULL;

View File

@ -409,7 +409,7 @@ void FunctionParser::funcParse(std::vector<foundInfo> & foundInfos, size_t begin
// dataToSearch & data2ToSearch are optional
if (!_functionNameExprArray.size() && !_classNameExprArray.size())
{
wchar_t foundData[1024];
wchar_t foundData[1024] {};
(*ppEditView)->getGenericText(foundData, 1024, targetStart, targetEnd);
fi._data = foundData; // whole found data
@ -418,7 +418,7 @@ void FunctionParser::funcParse(std::vector<foundInfo> & foundInfos, size_t begin
}
else
{
intptr_t foundPos;
intptr_t foundPos = -1;
if (_functionNameExprArray.size())
{
fi._data = parseSubLevel(targetStart, targetEnd, _functionNameExprArray, foundPos, ppEditView);

View File

@ -498,11 +498,11 @@ void ShortcutMapper::resizeDialogElements()
{
constexpr auto getRcWidth = [](const RECT& rc) -> int {
return rc.right - rc.left;
};
};
constexpr auto getRcHeight = [](const RECT& rc) -> int {
return rc.bottom - rc.top;
};
};
auto setOrDeferWindowPos = [](HDWP hWinPosInfo, HWND hWnd, HWND hWndInsertAfter, int x, int y, int cx, int cy, UINT uFlags) -> HDWP {
if (hWinPosInfo != nullptr)
@ -511,7 +511,7 @@ void ShortcutMapper::resizeDialogElements()
}
::SetWindowPos(hWnd, hWndInsertAfter, x, y, cx, cy, uFlags);
return nullptr;
};
};
constexpr UINT flags = SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS;
@ -543,6 +543,13 @@ void ShortcutMapper::resizeDialogElements()
::GetWindowRect(hFilterEdit, &rcFilterEdit);
::MapWindowPoints(nullptr, _hSelf, reinterpret_cast<LPPOINT>(&rcFilterEdit), 2);
RECT rcFilterClearBtn{};
HWND hFilterClearBtn = ::GetDlgItem(_hSelf, IDC_BABYGRID_FILTER_CLEAR);
::GetWindowRect(hFilterClearBtn, &rcFilterClearBtn);
int clrBtnWidth = rcFilterClearBtn.right - rcFilterClearBtn.left;
int clrBtnHeight = rcFilterClearBtn.bottom - rcFilterClearBtn.top;
RECT rcInfo{};
HWND hInfo = ::GetDlgItem(_hSelf, IDC_BABYGRID_INFO);
::GetWindowRect(hInfo, &rcInfo);
@ -562,7 +569,7 @@ void ShortcutMapper::resizeDialogElements()
const int heightFilter = getRcHeight(rcFilterEdit);
const int heightInfo = getRcHeight(rcInfo);
constexpr int nCtrls = 7;
constexpr int nCtrls = 8;
auto hdwp = ::BeginDeferWindowPos(nCtrls);
hdwp = setOrDeferWindowPos(hdwp, hModBtn, nullptr, center - gapBtnHalf - wBtn * 2 - gapBtn, rcClient.bottom, 0, 0, SWP_NOSIZE | flags);
@ -572,7 +579,8 @@ void ShortcutMapper::resizeDialogElements()
rcClient.bottom -= (gapBtnEdit + heightFilter);
hdwp = setOrDeferWindowPos(hdwp, hStatic, nullptr, rcClient.left, rcClient.bottom + gapBtnEdit / 2, 0, 0, SWP_NOSIZE | flags);
hdwp = setOrDeferWindowPos(hdwp, hFilterEdit, nullptr, rcFilterEdit.left, rcClient.bottom, rcClient.right - rcFilterEdit.left, heightFilter, flags);
hdwp = setOrDeferWindowPos(hdwp, hFilterEdit, nullptr, rcFilterEdit.left, rcClient.bottom, rcClient.right - rcFilterEdit.left - clrBtnWidth, heightFilter, flags);
hdwp = setOrDeferWindowPos(hdwp, hFilterClearBtn, nullptr, rcClient.right - clrBtnWidth + 2, rcClient.bottom, clrBtnWidth, clrBtnHeight, SWP_NOSIZE | flags);
hdwp = setOrDeferWindowPos(hdwp, hInfo, nullptr, rcClient.left, rcClient.bottom - gapBtnEdit - heightInfo, getRcWidth(rcClient), heightInfo, flags);
if (hdwp)
@ -1360,7 +1368,13 @@ intptr_t CALLBACK ShortcutMapper::run_dlgProc(UINT message, WPARAM wParam, LPARA
}
return TRUE;
}
case IDC_BABYGRID_FILTER_CLEAR:
{
HWND hFilterEdit = ::GetDlgItem(_hSelf, IDC_BABYGRID_FILTER);
::SetWindowText(hFilterEdit, L"");
::SetFocus(hFilterEdit);
return TRUE;
}
default:
{
break;

View File

@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#pragma code_page(65001)
#include <windows.h>
#include "ShortcutMapper_rc.h"
@ -31,7 +32,8 @@ BEGIN
CONTROL "",IDC_BABYGRID_TABBAR,"SysTabControl32",WS_TABSTOP,5,6,384,12
EDITTEXT IDC_BABYGRID_INFO,4,283,442,29,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | WS_VSCROLL | NOT WS_TABSTOP
RTEXT "Filter:",IDC_BABYGRID_STATIC,4,318,25,8
EDITTEXT IDC_BABYGRID_FILTER,32,316,414,12,ES_AUTOHSCROLL | ES_WANTRETURN
EDITTEXT IDC_BABYGRID_FILTER,32,316,402,12,ES_AUTOHSCROLL | ES_WANTRETURN
PUSHBUTTON "✕", IDC_BABYGRID_FILTER_CLEAR, 434, 316, 12, 12, WS_TABSTOP
PUSHBUTTON "Modify",IDM_BABYGRID_MODIFY,120,333,47,14
PUSHBUTTON "Clear",IDM_BABYGRID_CLEAR,174,333,47,14
PUSHBUTTON "Delete",IDM_BABYGRID_DELETE,228,333,47,14

View File

@ -26,3 +26,4 @@
#define IDM_BABYGRID_CLEAR (IDD_SHORTCUTMAPPER_DLG + 6)
#define IDC_BABYGRID_STATIC (IDD_SHORTCUTMAPPER_DLG + 7)
#define IDC_BABYGRID_FILTER (IDD_SHORTCUTMAPPER_DLG + 8)
#define IDC_BABYGRID_FILTER_CLEAR (IDD_SHORTCUTMAPPER_DLG + 9)

View File

@ -1077,7 +1077,7 @@ wstring CustomFileDialog::doSaveDlg()
CurrentDirBackup backup;
_impl->addFlags(FOS_PATHMUSTEXIST | FOS_FILEMUSTEXIST | FOS_FORCEFILESYSTEM);
_impl->addFlags(FOS_PATHMUSTEXIST | FOS_FILEMUSTEXIST | FOS_FORCEFILESYSTEM | FOS_NOTESTFILECREATE);
bool bOk = _impl->show();
return bOk ? _impl->getResultFilename() : L"";
}

View File

@ -20,6 +20,8 @@
#include "EncodingMapper.h"
#include "localization.h"
#include <algorithm>
#include "ScintillaEditView.h"
#define MyGetGValue(rgb) (LOBYTE((rgb)>>8))
@ -109,8 +111,22 @@ bool PreferenceDlg::goToSection(size_t iPage, intptr_t ctrlID)
if (ctrlID != -1)
{
::SetFocus(::GetDlgItem(_wVector[iPage]._dlg->getHSelf(), int(ctrlID)));
}
if (_gotoTip.isValid())
{
_gotoTip.hide();
}
NativeLangSpeaker* pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
static wstring hereTip = pNativeSpeaker->getLocalizedStrFromID("goto-setting-tip", L"Find your setting here");
bool isSuccessful = _gotoTip.init(_hInst, ::GetDlgItem(_wVector[iPage]._dlg->getHSelf(), int(ctrlID)), _hSelf, hereTip.c_str(), pNativeSpeaker->isRTL(), 2000);
if (!isSuccessful)
return false;
NppDarkMode::setDarkTooltips(_gotoTip.getTipHandle(), NppDarkMode::ToolTipsType::tooltip);
_gotoTip.show();
}
return true;
}
@ -226,6 +242,29 @@ intptr_t CALLBACK PreferenceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
return TRUE;
}
case WM_NCLBUTTONDOWN:
{
if (_gotoTip.isValid())
{
_gotoTip.hide();
}
return FALSE;
}
case WM_TIMER:
{
if (wParam == IDT_HIDE_TOOLTIP)
{
if (_gotoTip.isValid())
{
_gotoTip.hide();
KillTimer(_hSelf, IDT_HIDE_TOOLTIP);
return TRUE;
}
}
break;
}
case WM_CTLCOLORLISTBOX:
{
return NppDarkMode::onCtlColorListbox(wParam, lParam);
@ -1260,6 +1299,12 @@ intptr_t CALLBACK TabbarSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM
::SendMessage(::GetParent(_hParent), WM_SIZE, 0, 0);
// At startup, if "-notabbar" or "asNotepad.xml" is used, and tab bar was not hidden in the previous session,
// we force tab bar visible in the next session by setting _forceTabbarVisible to true.
// However, if "Hide tab bar" option is changed manually by user, then we don't force tab bar visible for the next session,
// and apply user's choice instead.
nppGUI._forceTabbarVisible = false;
return TRUE;
}
@ -3395,7 +3440,7 @@ intptr_t CALLBACK NewDocumentSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
{
LangType lt = static_cast<LangType>(i);
str.clear();
if (lt != L_USER && lt != L_JS)
if (lt != L_USER && lt != L_JS_EMBEDDED)
{
int cmdID = nppParam.langTypeToCommandID(lt);
if ((cmdID != -1))
@ -3403,7 +3448,7 @@ intptr_t CALLBACK NewDocumentSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
getNameStrFromCmd(cmdID, str);
if (str.length() > 0)
{
size_t index = ::SendDlgItemMessage(_hSelf, IDC_COMBO_DEFAULTLANG, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(str.c_str()));
auto index = ::SendDlgItemMessage(_hSelf, IDC_COMBO_DEFAULTLANG, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(str.c_str()));
::SendDlgItemMessage(_hSelf, IDC_COMBO_DEFAULTLANG, CB_SETITEMDATA, index, lt);
}
}
@ -3947,7 +3992,15 @@ intptr_t CALLBACK IndentationSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
const int nbLang = nppParam.getNbLang();
for (int i = 0; i < nbLang; ++i)
{
::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(nppParam.getLangFromIndex(i)->_langName.c_str()));
Lang* lang = nppParam.getLangFromIndex(i);
if (!lang) continue;
LanguageNameInfo lni = nppParam.getLangNameInfoFromNameID(lang->_langName);
if (!lni._shortName || lni._langID == L_JS_EMBEDDED) continue;
auto j = ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_ADDSTRING, 0, reinterpret_cast<LPARAM>(lni._shortName));
if (j != LB_ERR)
::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_SETITEMDATA, j, reinterpret_cast<LPARAM>(lang));
}
const int index2Begin = 0;
::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_SETCURSEL, index2Begin, 0);
@ -4002,10 +4055,10 @@ intptr_t CALLBACK IndentationSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
const int dlgCtrlID = ::GetDlgCtrlID(reinterpret_cast<HWND>(lParam));
const auto& hdcStatic = reinterpret_cast<HDC>(wParam);
// handle blurry text with disabled states for the affected static controls
const size_t index = ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETCURSEL, 0, 0);
const auto index = ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETCURSEL, 0, 0);
if ((index > 0) && (dlgCtrlID == IDC_TABSIZE_STATIC || dlgCtrlID == IDC_INDENTUSING_STATIC))
{
const Lang* lang = nppParam.getLangFromIndex(index - 1);
const Lang* lang = reinterpret_cast<Lang *>(::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETITEMDATA, index, 0));
if (lang == nullptr)
{
return NppDarkMode::onCtlColorDlg(hdcStatic);
@ -4041,7 +4094,7 @@ intptr_t CALLBACK IndentationSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
if (index > 0)
{
Lang* lang = nppParam.getLangFromIndex(index - 1);
const Lang* lang = reinterpret_cast<Lang*>(::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETITEMDATA, index, 0));
if (!lang) return FALSE;
bool useDefaultTab = (lang->_tabSize == -1 || lang->_tabSize == 0);
@ -4097,25 +4150,11 @@ intptr_t CALLBACK IndentationSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
}
const bool useDefaultTab = isCheckedOrNot(IDC_CHECK_DEFAULTTABVALUE);
const size_t index = ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETCURSEL, 0, 0);
const auto index = ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETCURSEL, 0, 0);
if (!useDefaultTab && index > 0)
{
Lang* lang = nppParam.getLangFromIndex(index - 1);
if (lang == nullptr)
{
return FALSE;
}
if (lang->_langID == L_JS)
{
Lang* ljs = nppParam.getLangFromID(L_JAVASCRIPT);
ljs->_tabSize = tabSize;
}
else if (lang->_langID == L_JAVASCRIPT)
{
Lang* ljavascript = nppParam.getLangFromID(L_JS);
ljavascript->_tabSize = tabSize;
}
Lang* lang = reinterpret_cast<Lang*>(::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETITEMDATA, index, 0));
if (lang == nullptr) return FALSE;
lang->_tabSize = tabSize;
@ -4150,11 +4189,11 @@ intptr_t CALLBACK IndentationSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
if (tabSize < 1)
{
const bool useDefaultTab = isCheckedOrNot(IDC_CHECK_DEFAULTTABVALUE);
const size_t index = ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETCURSEL, 0, 0);
const auto index = ::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETCURSEL, 0, 0);
auto prevSize = nppGUI._tabSize;
if (!useDefaultTab && index > 0)
{
Lang* lang = nppParam.getLangFromIndex(index - 1);
const Lang* lang = reinterpret_cast<Lang*>(::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETITEMDATA, index, 0));
if (lang != nullptr && lang->_tabSize > 0)
{
prevSize = lang->_tabSize;
@ -4194,22 +4233,11 @@ intptr_t CALLBACK IndentationSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
if (index != 0)
{
Lang *lang = nppParam.getLangFromIndex(index - 1);
Lang* lang = reinterpret_cast<Lang*>(::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETITEMDATA, index, 0));
if (!lang) return FALSE;
if (!lang->_tabSize || lang->_tabSize == -1)
lang->_tabSize = nppGUI._tabSize;
if (lang->_langID == L_JS)
{
Lang *ljs = nppParam.getLangFromID(L_JAVASCRIPT);
ljs->_isTabReplacedBySpace = isTabReplacedBySpace;
}
else if (lang->_langID == L_JAVASCRIPT)
{
Lang *ljavascript = nppParam.getLangFromID(L_JS);
ljavascript->_isTabReplacedBySpace = isTabReplacedBySpace;
}
lang->_isTabReplacedBySpace = isTabReplacedBySpace;
// write in langs.xml
@ -4234,22 +4262,11 @@ intptr_t CALLBACK IndentationSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
if (index != 0)
{
Lang* lang = nppParam.getLangFromIndex(index - 1);
Lang* lang = reinterpret_cast<Lang*>(::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETITEMDATA, index, 0));
if (!lang) return FALSE;
if (!lang->_tabSize || lang->_tabSize == -1)
lang->_tabSize = nppGUI._tabSize;
if (lang->_langID == L_JS)
{
Lang* ljs = nppParam.getLangFromID(L_JAVASCRIPT);
ljs->_isBackspaceUnindent = isBackspaceUnindent;
}
else if (lang->_langID == L_JAVASCRIPT)
{
Lang* ljavascript = nppParam.getLangFromID(L_JS);
ljavascript->_isBackspaceUnindent = isBackspaceUnindent;
}
lang->_isBackspaceUnindent = isBackspaceUnindent;
// write in langs.xml
@ -4272,7 +4289,7 @@ intptr_t CALLBACK IndentationSubDlg::run_dlgProc(UINT message, WPARAM wParam, LP
if (index == LB_ERR || index == 0) // index == 0 shouldn't happen
return FALSE;
Lang *lang = nppParam.getLangFromIndex(index - 1);
Lang* lang = reinterpret_cast<Lang*>(::SendDlgItemMessage(_hSelf, IDC_LIST_TABSETTNG, LB_GETITEMDATA, index, 0));
if (!lang)
return FALSE;
@ -4348,7 +4365,7 @@ intptr_t CALLBACK LanguageSubDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
//
for (int i = L_TEXT ; i < nppParam.L_END ; ++i)
{
if (static_cast<LangType>(i) != L_USER)
if (static_cast<LangType>(i) != L_USER && static_cast<LangType>(i) != L_JS_EMBEDDED)
{
int cmdID = nppParam.langTypeToCommandID(static_cast<LangType>(i));
if ((cmdID != -1))

View File

@ -434,5 +434,7 @@ private :
CloudAndLinkSubDlg _cloudAndLinkSubDlg;
SearchEngineSubDlg _searchEngineSubDlg;
SearchingSubDlg _searchingSubDlg;
ControlInfoTip _gotoTip;
};

View File

@ -324,6 +324,9 @@ void ProjectPanel::destroyMenus()
bool ProjectPanel::openWorkSpace(const wchar_t *projectFileName, bool force)
{
if (!projectFileName)
return false;
if ((!force) && (_workSpaceFilePath.length() > 0))
{ // Return if it is better to keep the current workspace tree
wstring newWorkspace = projectFileName;

View File

@ -27,8 +27,6 @@ bool Splitter::_isHorizontalFixedRegistered = false;
bool Splitter::_isVerticalFixedRegistered = false;
#define SPLITTER_SIZE 8
void Splitter::init( HINSTANCE hInst, HWND hPere, int splitterSize, double iSplitRatio, DWORD dwFlags)
{
if (hPere == NULL)
@ -205,7 +203,7 @@ int Splitter::getClickZone(WH which)
? (which == WH::width ? _splitterSize : HIEGHT_MINIMAL)
: (which == WH::width ? HIEGHT_MINIMAL : _splitterSize);
}
else // (_spiltterSize > 8)
else // (_splitterSize > 8)
{
return isVertical()
? ((which == WH::width) ? 8 : 15)
@ -514,8 +512,8 @@ void Splitter::gotoRightBottom()
void Splitter::drawSplitter()
{
PAINTSTRUCT ps;
RECT rc, rcToDraw1, rcToDraw2, TLrc, BRrc;
PAINTSTRUCT ps {};
RECT rc {}, rcToDraw1 {}, rcToDraw2 {}, TLrc {}, BRrc {};
HDC hdc = ::BeginPaint(_hSelf, &ps);
getClientRect(rc);
@ -649,7 +647,7 @@ void Splitter::rotate()
void Splitter::paintArrow(HDC hdc, const RECT &rect, Arrow arrowDir)
{
RECT rc;
RECT rc {};
rc.left = rect.left;
rc.top = rect.top;
rc.right = rect.right;
@ -717,14 +715,14 @@ void Splitter::adjustZoneToDraw(RECT& rc2def, ZONE_TYPE whichZone)
if (_splitterSize < 4)
return;
int x0, y0, x1, y1, w, h;
int x0 = 0, y0 = 0, x1 = 0, y1 = 0, w = 0, h = 0;
if (/*(4 <= _splitterSize) && */(_splitterSize <= 8))
{
w = (isVertical() ? 4 : 7);
h = (isVertical() ? 7 : 4);
}
else // (_spiltterSize > 8)
else // (_splitterSize > 8)
{
w = (isVertical() ? 6 : 11);
h = (isVertical() ? 11 : 6);

View File

@ -244,6 +244,56 @@ HINSTANCE Command::run(HWND hWnd, const wchar_t* cwd)
return res;
}
void RunDlg::insertVariable(unsigned char id)
{
wchar_t cmd[MAX_PATH]{};
::GetDlgItemText(_hSelf, IDC_COMBO_RUN_PATH, cmd, MAX_PATH);
wstring variable;
switch (id)
{
case 0:
variable = fullCurrentPath;
break;
case 1:
variable = currentDirectory;
break;
case 2:
variable = onlyFileName;
break;
case 3:
variable = fileNamePart;
break;
case 4:
variable = fileExtPart;
break;
case 5:
variable = currentWord;
break;
case 6:
variable = nppDir;
break;
case 7:
variable = nppFullFilePath;
break;
case 8:
variable = currentLine;
break;
case 9:
variable = currentColumn;
break;
case 10:
variable = currentLineStr;
break;
default:
return; // Invalid id number
}
wstring cmdNew = cmd;
cmdNew += L"$(" + variable + L")";
::SetDlgItemText(_hSelf, IDC_COMBO_RUN_PATH, cmdNew.c_str());
}
intptr_t CALLBACK RunDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
@ -312,6 +362,12 @@ intptr_t CALLBACK RunDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam
case WM_COMMAND:
{
if (LOWORD(wParam) >= IDM_RUN_DLG_VARMENU_START && LOWORD(wParam) <= IDM_RUN_DLG_VARMENU_END)
{
insertVariable(static_cast<unsigned char>(LOWORD(wParam) - IDM_RUN_DLG_VARMENU_START));
return TRUE;
}
switch (LOWORD(wParam))
{
case IDCANCEL :
@ -406,7 +462,23 @@ intptr_t CALLBACK RunDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam
return TRUE;
}
default :
case IDC_BUTTON_VARIABLES:
{
RECT rcButton;
GetWindowRect(::GetDlgItem(_hSelf, IDC_BUTTON_VARIABLES), &rcButton);
HMENU hmenu; // menu template
HMENU hVariablePopup; // shortcut menu
hmenu = ::LoadMenu(_hInst, MAKEINTRESOURCE(IDR_RUN_DLG_MENU_VARIABLES));
hVariablePopup = ::GetSubMenu(hmenu, 0);
TrackPopupMenu(hVariablePopup, TPM_LEFTALIGN, rcButton.right, rcButton.top, 0, _hSelf, NULL);
PostMessage(_hSelf, WM_NULL, 0, 0);
DestroyMenu(hmenu);
return TRUE;
}
default:
break;
}
}

View File

@ -59,6 +59,7 @@ public :
void destroy() override {};
protected :
void insertVariable(unsigned char id);
intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) override;
private :

View File

@ -24,16 +24,35 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#define IDC_STATIC -1
#endif
IDD_RUN_DLG DIALOGEX 0, 0, 186, 80
IDD_RUN_DLG DIALOGEX 0, 0, 402, 80
STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE
CAPTION "Run..."
FONT 8, L"MS Shell Dlg", 400, 0, 0x1
BEGIN
GROUPBOX "The &Program to Run",IDC_MAINTEXT_STATIC,7,6,172,48,BS_CENTER
COMBOBOX IDC_COMBO_RUN_PATH,14,26,138,71,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "...",IDC_BUTTON_FILE_BROWSER,156,25,16,14
DEFPUSHBUTTON "&Run",IDOK,16,60,50,14
PUSHBUTTON "&Save...",IDC_BUTTON_SAVE,69,60,50,14
PUSHBUTTON "&Cancel",IDCANCEL,122,60,50,14
GROUPBOX "The &Program to Run",IDC_MAINTEXT_STATIC,7,6,388,48,BS_CENTER
COMBOBOX IDC_COMBO_RUN_PATH,14,26,338,71,CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "...",IDC_BUTTON_FILE_BROWSER,356,25,16,14
PUSHBUTTON "&+",IDC_BUTTON_VARIABLES,372,25,16,14
DEFPUSHBUTTON "&Run",IDOK,124,60,50,14
PUSHBUTTON "&Save...",IDC_BUTTON_SAVE,177,60,50,14
PUSHBUTTON "&Cancel",IDCANCEL,230,60,50,14
END
IDR_RUN_DLG_MENU_VARIABLES MENU
BEGIN
POPUP "Variables menu"
BEGIN
MENUITEM "&FULL_CURRENT_PATH\tFull path to active file", IDM_RUN_DLG_VARMENU_START + 0
MENUITEM "CURRENT_&DIRECTORY\tActive file's directory", IDM_RUN_DLG_VARMENU_START + 1
MENUITEM "FILE_&NAME\tActive file's name", IDM_RUN_DLG_VARMENU_START + 2
MENUITEM "NAME_&PART\tFile name without extension", IDM_RUN_DLG_VARMENU_START + 3
MENUITEM "E&XT_PART\tFile extension (with .)", IDM_RUN_DLG_VARMENU_START + 4
MENUITEM "CURRENT_&WORD\tSelected word or word under caret", IDM_RUN_DLG_VARMENU_START + 5
MENUITEM "NPP_&DIRECTORY\tnotepad++.exe directory", IDM_RUN_DLG_VARMENU_START + 6
MENUITEM "NPP_F&ULL_FILE_PATH\tFull path of notepad++.exe", IDM_RUN_DLG_VARMENU_START + 7
MENUITEM "CURRENT_&LINE\tLine number of caret", IDM_RUN_DLG_VARMENU_START + 8
MENUITEM "CURRENT_&COLUMN\tColumn number of caret", IDM_RUN_DLG_VARMENU_START + 9
MENUITEM "CURRENT_LINE&STR\tCurrent line text", IDM_RUN_DLG_VARMENU_START + 10
END
END

View File

@ -21,4 +21,7 @@
#define IDC_COMBO_RUN_PATH (IDD_RUN_DLG + 2)
#define IDC_MAINTEXT_STATIC (IDD_RUN_DLG + 3)
#define IDC_BUTTON_SAVE (IDD_RUN_DLG + 4)
#define IDC_BUTTON_VARIABLES (IDD_RUN_DLG + 5)
#define IDR_RUN_DLG_MENU_VARIABLES 1950
#define IDM_RUN_DLG_VARMENU_START (IDD_RUN_DLG + 60)
#define IDM_RUN_DLG_VARMENU_END (IDM_RUN_DLG_VARMENU_START + 10)

View File

@ -1392,9 +1392,9 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT* pDrawItemStruct, bool isDarkMode)
const COLORREF colorActiveBg = isDarkMode ? NppDarkMode::getCtrlBackgroundColor() : ::GetSysColor(COLOR_BTNFACE);
const COLORREF colorInactiveBgBase = isDarkMode ? NppDarkMode::getBackgroundColor() : ::GetSysColor(COLOR_BTNFACE);
COLORREF colorInactiveBg = liteGrey;
COLORREF colorActiveText = ::GetSysColor(COLOR_BTNTEXT);
COLORREF colorInactiveText = grey;
COLORREF colorInactiveBg = _inactiveBgColour;
COLORREF colorActiveText = _activeTextColour;
COLORREF colorInactiveText = _inactiveTextColour;
if (!NppDarkMode::useTabTheme() && isDarkMode)
{
@ -1402,12 +1402,6 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT* pDrawItemStruct, bool isDarkMode)
colorActiveText = NppDarkMode::getTextColor();
colorInactiveText = NppDarkMode::getDarkerTextColor();
}
else
{
colorInactiveBg = _inactiveBgColour;
colorActiveText = _activeTextColour;
colorInactiveText = _inactiveTextColour;
}
HDC hDC = pDrawItemStruct->hDC;

View File

@ -438,8 +438,8 @@ intptr_t CALLBACK WindowsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
else if (pLvdi->item.iSubItem == 2) // Type
{
NppParameters& nppParameters = NppParameters::getInstance();
Lang *lang = nppParameters.getLangFromID(buf->getLangType());
if (NULL != lang)
Lang* lang = nppParameters.getLangFromID(buf->getLangType());
if (lang)
{
text = lang->getLangName();
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<!-- The key words of the supported languages, don't touch them! -->
<!-- The keywords of the supported languages, don't touch them! -->
<!-- For languages like C/C++ substyle1..8 entries, you may enter your own keywords in those entries,
to have them show up in the "Default keywords" list shown in the Style Configurator -->
<Languages>
@ -455,7 +455,7 @@
<Keywords name="type1"></Keywords>
<Keywords name="type2"></Keywords>
</Language>
<Language name="python" ext="py pyw pyx pxd pxi" commentLine="#" tabSettings="132">
<Language name="python" ext="py pyw pyx pxd pxi pyi" commentLine="#" tabSettings="132">
<Keywords name="instre1">and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield</Keywords>
<Keywords name="instre2">ArithmeticError AssertionError AttributeError BaseException BlockingIOError BrokenPipeError BufferError BytesWarning ChildProcessError ConnectionAbortedError ConnectionError ConnectionRefusedError ConnectionResetError DeprecationWarning EOFError Ellipsis EnvironmentError Exception False FileExistsError FileNotFoundError FloatingPointError FutureWarning GeneratorExit IOError ImportError ImportWarning IndentationError IndexError InterruptedError IsADirectoryError KeyError KeyboardInterrupt LookupError MemoryError ModuleNotFoundError NameError None NotADirectoryError NotImplemented NotImplementedError OSError OverflowError PendingDeprecationWarning PermissionError ProcessLookupError RecursionError ReferenceError ResourceWarning RuntimeError RuntimeWarning StopAsyncIteration StopIteration SyntaxError SyntaxWarning SystemError SystemExit TabError TimeoutError True TypeError UnboundLocalError UnicodeDecodeError UnicodeEncodeError UnicodeError UnicodeTranslateError UnicodeWarning UserWarning ValueError Warning WindowsError ZeroDivisionError abs all any ascii bin bool breakpoint bytearray bytes callable chr classmethod compile complex copyright credits delattr dict dir divmod enumerate eval exec exit filter float format frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len license list locals map max memoryview min next object oct open ord pow print property quit range repr reversed round set setattr slice sorted staticmethod str sum super tuple type vars zip</Keywords>
<Keywords name="substyle1"></Keywords>

View File

@ -19,14 +19,14 @@
//************ Notepad++ version **************************
#define NOTEPAD_PLUS_VERSION L"Notepad++ v8.8.3"
#define NOTEPAD_PLUS_VERSION L"Notepad++ v8.8.5"
// should be X.Y : ie. if VERSION_DIGITALVALUE == 4, 7, 1, 0 , then X = 4, Y = 71
// ex : #define VERSION_VALUE L"5.63\0"
#define VERSION_INTERNAL_VALUE L"8.83\0"
#define VERSION_INTERNAL_VALUE L"8.85\0"
#define VERSION_PRODUCT_VALUE L"8.8.3\0"
#define VERSION_DIGITALVALUE 8, 8, 3, 0
#define VERSION_PRODUCT_VALUE L"8.8.5\0"
#define VERSION_DIGITALVALUE 8, 8, 5, 0
//**********************************************************

View File

@ -1774,7 +1774,7 @@
<!-- Attention : Don't modify the name of styleID="0" -->
<WidgetStyle name="Default Style" styleID="32" fgColor="000000" bgColor="FFFFFF" fontName="Courier New" fontStyle="0" fontSize="10" />
<WidgetStyle name="Indent guideline style" styleID="37" fgColor="C0C0C0" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Brace highlight style" styleID="34" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="10" />
<WidgetStyle name="Brace highlight style" styleID="34" fgColor="FF0000" bgColor="FFFFFF" fontName="" fontStyle="1" fontSize="" />
<WidgetStyle name="Bad brace colour" styleID="35" fgColor="800000" bgColor="FFFFFF" fontName="" fontStyle="0" fontSize="" />
<WidgetStyle name="Current line background colour" styleID="0" bgColor="E8E8FF" />
<!-- In below rule 'fgColor' attribute for 'Selected text colour' can be unlocked with a enableSelectFgColor.xml file -->
@ -1825,6 +1825,6 @@
<WidgetStyle name="Document map" styleID="0" fgColor="FF8000" bgColor="FFFFFF" />
<WidgetStyle name="EOL custom color" styleID="0" fgColor="DADADA" />
<WidgetStyle name="Non-printing characters custom color" styleID="0" fgColor="FFB56A" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFF80" bgColor="FF8000" fontName="Courier New" fontStyle="0" fontSize="10" />
<WidgetStyle name="Global override" styleID="0" fgColor="FFFF80" bgColor="FF8000" fontName="Courier New" fontStyle="0" fontSize="" />
</GlobalStyles>
</NotepadPlus>

View File

@ -408,6 +408,87 @@ bool launchUpdater(const std::wstring& updaterFullPath, const std::wstring& upda
return true;
}
DWORD nppUacSave(const wchar_t* wszTempFilePath, const wchar_t* wszProtectedFilePath2Save)
{
if ((lstrlenW(wszTempFilePath) == 0) || (lstrlenW(wszProtectedFilePath2Save) == 0)) // safe check (lstrlen returns 0 for possible nullptr)
return ERROR_INVALID_PARAMETER;
if (!doesFileExist(wszTempFilePath))
return ERROR_FILE_NOT_FOUND;
DWORD dwRetCode = ERROR_SUCCESS;
bool isOutputReadOnly = false;
bool isOutputHidden = false;
bool isOutputSystem = false;
WIN32_FILE_ATTRIBUTE_DATA attributes{};
attributes.dwFileAttributes = INVALID_FILE_ATTRIBUTES;
if (getFileAttributesExWithTimeout(wszProtectedFilePath2Save, &attributes))
{
if (attributes.dwFileAttributes != INVALID_FILE_ATTRIBUTES && !(attributes.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
{
isOutputReadOnly = (attributes.dwFileAttributes & FILE_ATTRIBUTE_READONLY) != 0;
isOutputHidden = (attributes.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) != 0;
isOutputSystem = (attributes.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) != 0;
if (isOutputReadOnly) attributes.dwFileAttributes &= ~FILE_ATTRIBUTE_READONLY;
if (isOutputHidden) attributes.dwFileAttributes &= ~FILE_ATTRIBUTE_HIDDEN;
if (isOutputSystem) attributes.dwFileAttributes &= ~FILE_ATTRIBUTE_SYSTEM;
if (isOutputReadOnly || isOutputHidden || isOutputSystem)
::SetFileAttributes(wszProtectedFilePath2Save, attributes.dwFileAttributes); // temporarily remove the problematic ones
}
}
// cannot use simple MoveFile here as it retains the tempfile permissions when on the same volume...
if (!::CopyFileW(wszTempFilePath, wszProtectedFilePath2Save, FALSE))
{
// fails if the destination file exists and has the R/O and/or Hidden attribute set
dwRetCode = ::GetLastError();
}
else
{
// ok, now dispose of the tempfile used
::DeleteFileW(wszTempFilePath);
}
// set back the possible original file attributes
if (isOutputReadOnly || isOutputHidden || isOutputSystem)
{
if (isOutputReadOnly) attributes.dwFileAttributes |= FILE_ATTRIBUTE_READONLY;
if (isOutputHidden) attributes.dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN;
if (isOutputSystem) attributes.dwFileAttributes |= FILE_ATTRIBUTE_SYSTEM;
::SetFileAttributes(wszProtectedFilePath2Save, attributes.dwFileAttributes);
}
return dwRetCode;
}
DWORD nppUacSetFileAttributes(const DWORD dwFileAttribs, const wchar_t* wszFilePath)
{
if (lstrlenW(wszFilePath) == 0) // safe check (lstrlen returns 0 for possible nullptr)
return ERROR_INVALID_PARAMETER;
if (!doesFileExist(wszFilePath))
return ERROR_FILE_NOT_FOUND;
if (dwFileAttribs == INVALID_FILE_ATTRIBUTES || (dwFileAttribs & FILE_ATTRIBUTE_DIRECTORY))
return ERROR_INVALID_PARAMETER;
if (!::SetFileAttributes(wszFilePath, dwFileAttribs))
return ::GetLastError();
return ERROR_SUCCESS;
}
DWORD nppUacMoveFile(const wchar_t* wszOriginalFilePath, const wchar_t* wszNewFilePath)
{
if ((lstrlenW(wszOriginalFilePath) == 0) || (lstrlenW(wszNewFilePath) == 0)) // safe check (lstrlen returns 0 for possible nullptr)
return ERROR_INVALID_PARAMETER;
if (!doesFileExist(wszOriginalFilePath))
return ERROR_FILE_NOT_FOUND;
if (!::MoveFileEx(wszOriginalFilePath, wszNewFilePath, MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED | MOVEFILE_WRITE_THROUGH))
return ::GetLastError();
else
return ERROR_SUCCESS;
}
} // namespace
@ -417,6 +498,39 @@ std::chrono::steady_clock::time_point g_nppStartTimePoint{};
int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE /*hPrevInstance*/, _In_ PWSTR pCmdLine, _In_ int /*nShowCmd*/)
{
g_nppStartTimePoint = std::chrono::steady_clock::now();
// Notepad++ UAC OPS /////////////////////////////////////////////////////////////////////////////////////////////
if ((lstrlenW(pCmdLine) > 0) && (__argc >= 2)) // safe (if pCmdLine is NULL, lstrlen returns 0)
{
const wchar_t* wszNppUacOpSign = __wargv[1];
if (lstrlenW(wszNppUacOpSign) > lstrlenW(L"#UAC-#"))
{
if ((__argc == 4) && (wcscmp(wszNppUacOpSign, NPP_UAC_SAVE_SIGN) == 0))
{
// __wargv[x]: 2 ... tempFilePath, 3 ... protectedFilePath2Save
return static_cast<int>(nppUacSave(__wargv[2], __wargv[3]));
}
if ((__argc == 4) && (wcscmp(wszNppUacOpSign, NPP_UAC_SETFILEATTRIBUTES_SIGN) == 0))
{
// __wargv[x]: 2 ... dwFileAttributes (string), 3 ... filePath
try
{
return static_cast<int>(nppUacSetFileAttributes(static_cast<DWORD>(std::stoul(std::wstring(__wargv[2]))), __wargv[3]));
}
catch ([[maybe_unused]] const std::exception& e)
{
return static_cast<int>(ERROR_INVALID_PARAMETER); // conversion error (check e.what() for details)
}
}
if ((__argc == 4) && (wcscmp(wszNppUacOpSign, NPP_UAC_MOVEFILE_SIGN) == 0))
{
// __wargv[x]: 2 ... originalFilePath, 3 ... newFilePath
return static_cast<int>(nppUacMoveFile(__wargv[2], __wargv[3]));
}
}
} // Notepad++ UAC OPS////////////////////////////////////////////////////////////////////////////////////////////
bool TheFirstOne = true;
::SetLastError(NO_ERROR);

View File

@ -1,17 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32002.261
# Visual Studio Version 17
VisualStudioVersion = 17.14.36109.1 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Notepad++", "notepadPlus.vcxproj", "{FCF60E65-1B78-4D1D-AB59-4FC00AC8C248}"
ProjectSection(ProjectDependencies) = postProject
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD} = {C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD} = {19CCA8B8-46B9-4609-B7CE-198DA19F07BD}
{E541C9BE-13BC-4CE6-A0A4-31145F51A2C1} = {E541C9BE-13BC-4CE6-A0A4-31145F51A2C1}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lexilla", "..\..\lexilla\src\Lexilla.vcxproj", "{E541C9BE-13BC-4CE6-A0A4-31145F51A2C1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scintilla", "..\..\scintilla\win32\Scintilla.vcxproj", "{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Scintilla", "..\..\scintilla\win32\Scintilla.vcxproj", "{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -47,18 +47,18 @@ Global
{E541C9BE-13BC-4CE6-A0A4-31145F51A2C1}.Release|Win32.Build.0 = Release|Win32
{E541C9BE-13BC-4CE6-A0A4-31145F51A2C1}.Release|x64.ActiveCfg = Release|x64
{E541C9BE-13BC-4CE6-A0A4-31145F51A2C1}.Release|x64.Build.0 = Release|x64
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Debug|ARM64.ActiveCfg = Debug|ARM64
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Debug|ARM64.Build.0 = Debug|ARM64
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Debug|Win32.ActiveCfg = Debug|Win32
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Debug|Win32.Build.0 = Debug|Win32
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Debug|x64.ActiveCfg = Debug|x64
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Debug|x64.Build.0 = Debug|x64
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Release|ARM64.ActiveCfg = Release|ARM64
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Release|ARM64.Build.0 = Release|ARM64
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Release|Win32.ActiveCfg = Release|Win32
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Release|Win32.Build.0 = Release|Win32
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Release|x64.ActiveCfg = Release|x64
{C5FBF9A9-FBEF-487B-A5ED-4542E6F03FCD}.Release|x64.Build.0 = Release|x64
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Debug|ARM64.ActiveCfg = Debug|ARM64
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Debug|ARM64.Build.0 = Debug|ARM64
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Debug|Win32.ActiveCfg = Debug|Win32
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Debug|Win32.Build.0 = Debug|Win32
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Debug|x64.ActiveCfg = Debug|x64
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Debug|x64.Build.0 = Debug|x64
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Release|ARM64.ActiveCfg = Release|ARM64
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Release|ARM64.Build.0 = Release|ARM64
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Release|Win32.ActiveCfg = Release|Win32
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Release|Win32.Build.0 = Release|Win32
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Release|x64.ActiveCfg = Release|x64
{19CCA8B8-46B9-4609-B7CE-198DA19F07BD}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -19,11 +19,12 @@ _Since the release of version 8.8.3 Notepad++ is signed using code signing certi
- **Name:** Notepad++ Root Certificate
- **Serial Number:** 7A137FBEA48E8D469D2B43D49EBBCB21
- **Fingerprint:** C80539FF7076D22E73A01F164108DAFBF06E45E4
- **SHA256:** 443B4543C3A682804540849793556FFD3A6CE5D4721C9ADFDA6450223DDD54D7
- **Created:** 2025-07-09
- **Expires:** 2035-07-09
- **Expires:** 2055-07-09
https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/nppRoot.crt
Primary Location: https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/nppRoot.crt<br/>
Secondary Location: https://notepad-plus-plus.org/nppRoot.crt<br/>
Tertiary Location: https://npp-user-manual.org/docs/certs/nppRoot.crt
Notepad++ Code Signing Certificate
----------------------------------
@ -33,7 +34,6 @@ _Since the release of version 8.8.3 Notepad++ is signed using code signing certi
- **Emitted by:** Notepad++ Root Certificate
- **Serial Number:** 38D07732D5E4A2628A303D479035C1D1
- **Fingerprint:** 7F517E235584AFC146F6D3B44CD34C6CC36A3AB2
- **SHA256:** E372E385C1A04527D152B155254F03B073C3A1E332D3288774CBE440E4C59A94
- **Created:** 2025-07-09
- **Expires:** 2028-07-09