Commit Graph

5251 Commits (9e4290094dfd008bd1de1b3cf4b23c204cb0bba6)

Author SHA1 Message Date
ozone10 6cbb1273a3 Tweak Find in File Progress hits text position
- increase width for Find dialog In selection checkbox
- increase width for Preference Autocompletion html/xml close tag checkbox

According the community's decision:
https://community.notepad-plus-plus.org/topic/25874/poll-find-in-files-hits-position

ref https://github.com/notepad-plus-plus/notepad-plus-plus/pull/15187#issuecomment-2159602146

Fix #15244, fix #13426, close #15268
2024-06-13 14:47:06 +02:00
Coises f2e5739d4d Fix rectangular selection copy-paste bug
Restore old paste into rectangular selection behavior: only call pasteIntoMultiSelection for multiple stream selections and not for rectangular selections.

Fix #15139, fix #15151, close #15261
2024-06-12 15:56:23 +02:00
ozone10 dc53d1b7a7 Add F13-F24 keys to Shortcut Mapper
Fix #11975, close #15269
2024-06-12 02:19:13 +02:00
Alan Kilborn 721a845bec Fix unsaved tab containing tab character display glitch
Disallow tab character via pasting when renaming a file tab.

Fix #15202, close #15211
2024-06-12 01:24:42 +02:00
ozone10 f37f2d0ffe Use new dpi scaled size for docking panel tab icons
Ref #14959

Close #15267
2024-06-11 03:26:30 +02:00
xomx 83f1195bc1 Add installer new option '/closeRunningNpp'
New Notepad++ NSIS installer cmdline option.

If specified on the cmdline, it first tries to use the usual app-closing by sending the WM_CLOSE message to the running Notepad++.
If that standard closing fails, it uses consequently the forceful TerminateProcess WINAPI way.

Partially fix the #8514, followup of the #14251.

Close #15230
2024-06-09 21:19:42 +02:00
WildByDesign aea78d71e2 Show All Characters Icon Fix
- fixes the All Characters Icon which was blurry at 16x16

Close #15259
2024-06-09 03:22:32 +02:00
WildByDesign 7291823e1a Update Fluent toolbar icons
Updated icons for 16x16, 20x20, 24x24, 32x32, 40x40, 48x48, 64x64 and 96x96

Close #15253
2024-06-08 17:06:19 +02:00
xomx 8beda66cb8 Fixed the "lost" panels issue
Implement some size limits for the Notepad++ docked and floating panels, as the users often "lost" its panels (e.g. when they minimized them to zero width or height).

This also fixes the config.xml possible previous "out-of-the-allowed-range" data.

Fix #13084, close #15236
2024-06-08 03:58:43 +02:00
ozone10 e7e88a380a Add "Show All Character" context menu on toolbar button
Fix #14832, close #15235
2024-06-07 00:47:31 +02:00
Don Ho 7a401cface Enlarge the labels of indent settings 2024-06-06 19:58:35 +02:00
ozone10 07e95038cb Add message box with information about disabled backward regex searching
Fix #15239, close #15243
2024-06-06 18:05:13 +02:00
ozone10 ea71d5ea4e Fix small width for "Ignore case" checkbox in UDL for some languages
Fix #15233, close #15234
2024-06-05 18:16:41 +02:00
xomx 9f6e9c0cfc Update English translation for v8.6.8 (indentation setting)
Related to: #15203

Close #15237
2024-06-05 17:21:19 +02:00
Don Ho df4e8f5b73 Fix integer overflow issue in Column Editor
Fix #15167, close #15222
2024-06-05 00:58:56 +02:00
Don Ho 61bcf3a2bc Notepad++ v8.6.8 - Support Taiwan's Sovereignty 2024-06-04 03:55:45 +02:00
popcorner bc1436a5c0 Update chineseSimplified.xml
Close #15154
2024-06-04 00:41:16 +02:00
ozone10 6cd6aa3843 Make clang warnings flags in makefile and msvc consistent
PR #15189 added option to use clang with gcc makefile.
This PR makes clang warnings flags in makefile and msvc consistent.

Close #15227
2024-06-01 01:26:04 +02:00
ozone10 fedaabf0f8 Fix toolbar pressed button visual glitch in dark mode
Use custom draw for main toolbar in dark mode.

Fix #15225, close #15226
2024-06-01 00:58:08 +02:00
ozone10 cfcb0d73cf Fix file opening issue with control characters initial appearence
Fix #13988, close #15219
2024-05-31 03:56:10 +02:00
ozone10 6c660a71b3 Add missing monitoring icon for disabled state
Fix #15217, close #15218
2024-05-31 03:37:52 +02:00
Christian Grasser b4b76ff770 Code enhancement: Nullpointer checks
- zero init LexSearchResult.cxx lineBuffer
- WindowsDlg::resetSelection() add nullpointer check as assert just triggers on debug builds
- added missing nullpointer checks in Utf8_16.cpp on allocated memory
- added missing nullpointer check on notifyView for case SCN_AUTOCSELECTION in NppNotification.cpp
- added missing nullpointer check on clipboardData in NppCommands.cpp

Close #15195
2024-05-31 02:57:39 +02:00
ozone10 c89033bd8a Replace bmp with ico for panels with toolbar
- use correct styles for toolbar
- change panel toolbar icons if dark/light mode has changed
- align panel toolbar icons
- add initialization

ref #14959

Close #15204
2024-05-29 00:04:55 +02:00
Don Ho 0019e20f82 Make naming correct for indent settings of Preferences dialog
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15180#issuecomment-2129892136

Close #15203
2024-05-28 18:41:56 +02:00
ozone10 cdf32d198b Reorganize icons folder
- remove unused delete icon and code related to it
- remove notepadPlus.Resource.targets
- fix dark mode edit control in preference file association subdialog

ref https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14959#issuecomment-2131289263

Close #15192
2024-05-27 03:14:37 +02:00
Christian Grasser 2ed6c77dfe CI enhancement
- update CI link from appveyor to GH action
- add option to makefile build mingw build also with Clang++ instead of g++
- add option to makefile to enable clang analyzer

Close #15189
2024-05-25 16:19:47 +02:00
Alan Kilborn b3b90a5dc0 Add auto-indent feature for Python
Fix #15122, close #15159
2024-05-25 15:56:55 +02:00
ozone10 9c1f972ee3 Add new dpi support to Find in Files Progress window
ref #14959

Fix #15027, close #15187
2024-05-25 03:42:17 +02:00
ozone10 6c5f0009b4 Use gdi dpi scaling for Windows dialog
- tweak dpi scaling for ColourPopup dialog.

ref #14959

Close #15186
2024-05-25 03:26:06 +02:00
ozone10 00ea1a9089 Handle new dpi message in Shortcut Mapper
ref #14959

Close #15173
2024-05-22 18:25:58 +02:00
cddiffz 0baac8af59 Fix extra space inserted issue with HEX mode in Column Editor
Fix extra space inserted when inserting hexadecimal numbers with Column Editor:
Remove rounding of odd number of digits.

Fix #15168, close #15176
2024-05-22 17:39:34 +02:00
ozone10 4ad57c1dd1 Replace GetSystemMetrics with new dpi manager's ones
- remove unneeded declarations in NppDarkMode.h
ref 5123016#r142224732

ref #14959

Close #15171
2024-05-22 05:02:22 +02:00
ozone10 49340a8707 Refactor ShortcutMapper resizing for new dpi compatibility
ref #14959

Close #15169
2024-05-22 04:51:06 +02:00
molsonkiko 106bdcc016 Fix negative repeat value in Column Editor causes hang issue
Fix #15153, close #15166
2024-05-21 16:35:49 +02:00
ozone10 912c5ee300 Make english language text with colon (':') consistent
Fix #4628, close #15165
2024-05-21 14:31:40 +02:00
ozone10 ef840de150 Make top bar indicate applied tab color for unfocused view
- use new dpi scaled metrics.
- replace c-casts.

Fix #15140, close #15160
2024-05-21 00:53:32 +02:00
Don Ho 382c33e99a Prevent the division by 0 in getNbDigits function
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/15152#discussion_r1605845654

Close #15157
2024-05-20 20:26:04 +02:00
Don Ho 13eede938e Improve NPPM_GETTABCOLORID API comment 2024-05-20 19:33:44 +02:00
Alan Kilborn 9244cd0943 Add plugin commands NPPM_GETTABCOLORID
No NPPM_SETTABCOLORID though. Plugins can use NPPM_MENUCOMMAND to set current tab color with the desired tab color ID.

Fix #15115, close #15142
2024-05-20 18:08:52 +02:00
ozone10 fb086bbcda Fix moving Find dialog to center of Notepad++ bug (new DPI manager)
Move window for dpi change for goToCenter().

ref #14959

Close #15158
2024-05-19 20:45:41 +02:00
cddiffz d0e3a1a210 Fix crash in Column Editor
Avoid division by zero (due to an arithmetic overflow).

Fix #15144, close #15152
2024-05-19 04:39:55 +02:00
ozone10 bdc11a47ff Make new DPI management support for Find Replace dialog
Handle dpi messages in Find dialog.

ref #14959

Close #15146
2024-05-18 19:22:14 +02:00
ozone10 5123016baa Make toolbar dark mode support better for plugins
Tweak dark mode custom draw for plugin:
- add plugin custom draw support for toolbar
- make code more consistent
- make plugin's authors custom draw implementation
to have higher priority than one from generic dark mode

ref #15078 (comment)

Close #15147
2024-05-17 19:16:32 +02:00
ozone10 e25e15b9b2 Refactor 'FindReplaceDlg::resizeDialogElements()' to be more compatible with HiDPI
ref #14959

Close #15145
2024-05-17 03:25:32 +02:00
ozone10 71914ed545 Use new dpi management for Find & Replace dialog fonts
ref #14959

Close #15098
2024-05-16 19:38:33 +02:00
ozone10 4cd231114e Improve status bar resize handling
- make controls spacing and position consistent.

ref #14959

Close #15090
2024-05-16 19:02:59 +02:00
ozone10 3b515f1242 Initial new dpi management support for Shortcut Mapper
ref #14959

Close #15089
2024-05-16 18:47:43 +02:00
Ovidiu Rădoi 8055b5687b Plugin dark mode customization improvement for tree view
Allow plugins to handle Custom Draw in TreeView controls.

Fix #15077, close #15078
2024-05-15 18:10:39 +02:00
Don Ho 126ad0bc07 Notepad++ 8.6.7 release 2024-05-13 02:34:25 +02:00
Tmp341 a1aa8682d1 [xml] Update Turkish localization
* According to d039eaa and 12548b6 commits.

Close #15121
2024-05-12 16:24:10 +02:00
Don Ho 1e19719f8f Fix regression of multi-edit cursors placed wrongly issue
Fix #15126, close #15129
2024-05-12 15:58:22 +02:00
Don Ho 78c7c3e645 Fix some code for WM_COMMAND outside of it in preferenceDlg.cpp
Fix #15119
2024-05-12 02:39:19 +02:00
Christian Grasser 973fb36044 Add auto-completion for Go & Raku, function list for Raku
- added autoCompletion for Go and Raku to installer script.
- added function list for Raku as starting point, currently just an adapted copy of the perl functionlist.

Related to #15000 and #14966

Close #15128
2024-05-12 01:30:49 +02:00
ozone10 9d6e6d2e04 Fix symbol '&' not showing in Document Switcher
Disable prefix processing in document switcher.

Fix #15117, close #15118
2024-05-11 16:31:45 +02:00
ozone10 971aaf680a Fix multi-editing not showing multiple cursors in dark mode
Add 'multi-edit' styles to Style Configurator for themes if missing.

Fix #15075, close #15109
2024-05-11 04:45:03 +02:00
PeterCJ da5f896de6 Language enhancement: allow custom tags in HTML
HTML Lexer, TAG Style: enable user-defined keywords
Implement and verify @mpheath solution from https://community.notepad-plus-plus.org/topic/25741/html-user-defined-keywords

Fix #15093, close #15094
2024-05-11 03:36:14 +02:00
ozone10 f6d304f943 Fix dialogs out of screen problem
Reposition dialogs if they are outside screen.

Fix #11240, fix #14913, close  #15083
2024-05-11 01:07:28 +02:00
Don Ho ee3aecb161 Fix a typo 2024-05-10 23:18:55 +02:00
Don Ho ec7c5cec42 Notepad++ 8.6.6 release 2024-05-10 01:45:08 +02:00
ozone10 eb627b0677 Enhance GUI: make sizing arrows more coherent in Find dialog
Remove vertical sizing arrows from Find & Replace dialog.

fix #15099, close #15100
2024-05-06 18:48:52 +02:00
ozone10 c64d706871 Fix GCC reorder warning, use override, remove duplicated code
Fix gcc reorder warning
https://github.com/notepad-plus-plus/notepad-plus-plus/actions/runs/8963463099/job/24613797904#step:4:403

Close #15101
2024-05-06 17:50:44 +02:00
rddim e53bb4c88f [xml] Update Bulgarian localization
Close #15092
2024-05-06 05:11:13 +02:00
MarkusBodensee c584a77e0e Fix URL enclosed in apostrophes or backtick not working issue
Check if URL is enclosed in apostrophes or backtick (grave accent). Only if URL is directly preceded by apostrophe/backtick and URL ends with apostrophe/backtick respectively.

Fix #14978, fix #14323, fix #14212, close #15058
2024-05-06 05:07:48 +02:00
Don Ho 6281227d84 Add more unit tests for Ada function list
for enhancement:
8ab9b99b73
2024-05-05 23:28:41 +02:00
notdodgeball 8ab9b99b73 Ada Function List improvements
Changes:
Ada is case insensitive
Added 'Parallel' reserved word
Identifiers may not begin or end with underscore
Support for identifiers containing digits
Support for Ada specifications file (subprogram declaration) (#14687)
Support for dot notation within types (#14908)
Support for generic instantiations (#14498) (functions with no return statement)

Fix #14908, fix #14687, fix #14498, close #14986
2024-05-05 22:21:17 +02:00
PeterCJ aa6a55cb7e Enable remaining 4 keyword lists
including langs.model.xml, stylers.xml and all themes.

Fix #15081, fix #7615, close #15088
2024-05-05 17:43:55 +02:00
Karlo-F e987f360cd [xml] Update Croatian translation for Notepad++ 8.6.6
Close #15085
2024-05-05 15:48:33 +02:00
Don Ho 3609a21258 Fix same file opened 2 times with different sensitive case of path regression
The regression is due to PR #14971 & commit 2531b4d12c

ref:
https://community.notepad-plus-plus.org/topic/25742/notepad-v8-6-6-release-candidate/3?_=1714876196550
2024-05-05 04:32:35 +02:00
Don Ho 2d076b645a Refactoring for new DPI management: avoiod the multiple inherence
Using the composition instead of the multiple inherence
1. For preventing from the diamond problem.
2. To fix the semantic problem by using DPIManagerV2 as class ancestor of class StaticDialog.

Remove also unecessary scaleX, unscaleX, scaleY & unscaleY methods.
2024-05-02 18:26:20 +02:00
Piotr Kostrzewski e518c79a53 Update polish.xml
Close #14927
2024-05-01 17:25:47 +02:00
A. Regnander cb9fb5c22d Update swedish.xml
Added new strings, removed outdated strings, made changes to existing strings

Close #14939
2024-05-01 17:23:02 +02:00
Juan 1183b4bb63 Update spanish.xml
Close #15025
2024-05-01 17:20:20 +02:00
Juan 3c0e54a012 Update galician.xml
Close #15026
2024-05-01 17:18:43 +02:00
~GOLEM~ 4c367f4dea [xml] Update russian.xml v8.6.6
Close #15037
2024-05-01 17:14:55 +02:00
Patriccollu 052d601e51 [xml] Update Corsican translation for Notepad++ 8.6.6
Close #15070
2024-05-01 17:12:52 +02:00
Alan Kilborn c63e29f21e Make F3 & Shift-F3 work in Find Replace dialog
Fix #2138, close #15063
2024-05-01 15:56:03 +02:00
Don Ho 188375e2ee Adapt TabBar to new DPI management
ref #14959

Close #15054
2024-05-01 03:23:47 +02:00
Christian Grasser 592d981b55 Update to nlohman json 3.11.3
Update to nlohman json 3.11.3 from https://github.com/nlohmann/json/releases/tag/v3.11.3
https://github.com/nlohmann/json/releases/download/v3.11.3/json.hpp

Close #15041
2024-04-30 04:31:38 +02:00
Christian Grasser 881e8c285e Update to scintilla 5.5.0 & Lexilla 5.3.2
Sintilla Release 5.5.0 (https://www.scintilla.org/scintilla550.zip)

    Released 23 April 2024.
    Add elements for inactive additional selections SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_TEXT and SC_ELEMENT_SELECTION_INACTIVE_ADDITIONAL_BACK. When not set these default to SC_ELEMENT_SELECTION_INACTIVE_TEXT and SC_ELEMENT_SELECTION_INACTIVE_BACK. Bug #2417.
    On Cocoa, avoid use of NSUserDefaults which will soon require justification when used in applications on the App Store.
    Fix Win32 IME crash in windowed mode. Bug #2433.
    Scale reverse arrow cursor for margins to match other cursors when user changes pointer size. Bug #2321.

Lexilla Release 5.3.2 (https://www.scintilla.org/lexilla532.zip)

    Released 23 April 2024.
    COBOL: Stop string literal continuing over line end. Issue #229.
    COBOL: Stop doc comment assigning different styles to \r and \n at line end. Issue #229.
    COBOL: Recognize keywords that start with 'V'. Issue #230.
    COBOL: Recognize comments after tag or that start with '/'. Issue #231.
    HTML: Implement substyles for tags, attributes, and identifiers SCE_H_TAG, SCE_H_ATTRIBUTE, SCE_HJ_WORD, SCE_HJA_WORD, SCE_HB_WORD, SCE_HP_WORD, SCE_HPHP_WORD.
    HTML: Implement context-sensitive attributes. "tag.attribute" matches "attribute" only inside "tag".
    HTML: Match standard handling of comments. Issue #232.
    Lua: Implement substyles for identifiers SCE_LUA_IDENTIFIER.
    Ruby: Allow non-ASCII here-doc delimiters. Issue #234.
    Ruby: Allow modifier if, unless, while and until after heredoc delimiter. Issue #236.
    Rust: Recognize raw identifiers. Issue #239, Pull request #240.

Close #15042
2024-04-30 04:19:49 +02:00
Don Ho c823ca8150 Adapt new DPI support for toolbar
ref #14959

Close #15044
2024-04-25 02:59:33 +02:00
Don Ho 89aaf43722 Use standard function (wcscmp/wcsicmp) instead home made one
Close #15030
2024-04-24 02:45:54 +02:00
Don Ho 4ffa8fcdf9 Small refactoring 2024-04-23 05:21:29 +02:00
ozone10 560f29fc8c Add dpi support to Style Configurator dialog
- reorder controls for consistent tab switch
- make spacing and position more consistent
- use system aware or gdi scaling for Color dialog and Color popup

ref #14959

Close #15029
2024-04-23 05:07:28 +02:00
Davi Feliciano Nonnenmacher 2531b4d12c Fix issue with case sensitive files
Fix #14724, close #14971
2024-04-22 19:04:58 +02:00
Don Ho 3c06d89b2a Fix wrong display of DarkMode on the 2nd monitor 2024-04-22 05:33:45 +02:00
ozone10 018d4f9a1f Add dpi support to UDL dialogs
- StringDlg (Rename Current Tab, ...)
- UDL Styler
- UDL in undock state

- UDL allow tab switching between main dialog and subdialogs
- make controls spacing and size consistent

ref #14959

Close #15024
2024-04-21 18:08:01 +02:00
ozone10 d43582d615 Add new DPI support to plugin admin dialog
ref #14959

Close #15023
2024-04-21 16:33:54 +02:00
ozone10 752777086e Add new DPI support to preference dialog
ref #14959

Close #15022
2024-04-21 15:50:06 +02:00
ozone10 4031339c58 Add dpi support to dialogs
- FindInFinder
- GoToLine
- ColumnEditor
- FindCharsInRange
- ProjectPanel FileRelocalizerDlg

ref #14959

Close #15020
2024-04-21 03:08:02 +02:00
ozone10 b476c67447 Add new DPI support to hash dialogs
- fix leak because of font.

ref #14959

Close  #15018
2024-04-21 01:53:09 +02:00
ozone10 34a6bf196e Add new DPI support to dialogs
- Run
- Run a Macro Multiple Times...
- Shortcut

- code enhancement
    - add override in shortcut.h
    - modify switches in WM_COMMAND
    - optimize dark mode for shortcut
    - avoid potential multiple subclassing for Run dialog

ref #14959

Close #15017
2024-04-20 19:28:49 +02:00
ozone10 61083a4468 Allow Ctrl-TAB to switch tabs in PluginAdmin and UDL dialogs
Fix #7932, close #15015
2024-04-20 17:52:52 +02:00
ozone10 b7ebd389c7 Add new DPI support to status bar
ref #14959

Close #15016
2024-04-20 05:02:06 +02:00
Don Ho e6558a3618 Enhance source code 2024-04-20 02:54:38 +02:00
mpheath 8672d95ca4 Fix user defined auto-insert not working issue
Fix #3171, fix #8063, fix #12547, fix #14831, close #15005
2024-04-20 02:38:33 +02:00
ozone10 914869936b Enhance GUI: resize checkboxes/radio buttons as text length needs
Fix #15006, close #15007
2024-04-19 20:33:44 +02:00
ozone10 27e77cf6d6 Add dpi support to dialogs
- About
- DebugInfo
- Save All
- Close All

ref #14959

Close #14989
2024-04-18 17:16:52 +02:00
ozone10 01a088f994 Use new dpi manager scaled default fonts
ref #14959

Close #14991
2024-04-18 15:15:22 +02:00
xomx a92a9fd7c7 Fix wrong dropped file view
Fix #14951, close #14953
2024-04-18 14:28:02 +02:00
PeterCJ 161bb41425 Add syntax highlighting for Raku
Based on SciTE, Go/Golang can use cpp lexer.
Use the Perl color scheme from each theme as the basis for the Raku color scheme.

Fix #4465, close #15000
2024-04-16 01:33:40 +02:00
Don Ho 0e8781938d Add log while flush file buffers action fails
Currently while flush file buffers action fails at not critical end session, a error message dialog display the problem.
It raises the problem of some external process interfering with the Notepad++ file saving (via NppSaveAsAdmin plugin).

This commit logs this error at critical end session, so if NUL characters content issue happens to the users again, we can try to know what was happening, plus users' plugin list.

Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/14990#issuecomment-2054242025

Close #15003
2024-04-16 01:17:13 +02:00
Christian Grasser 25c6795d0c Code enhancements
- fix linux build on include upper/lowercase issue ../src/dpiManagerV2.cpp:20:10: fatal error: CommCtrl.h: No such file or directory
- avoid clang warning: 5>..\src\WinControls\Grid\BabyGrid.cpp(677,7): warning : unused variable 'rectwhole' [-Wunused-variable]
- avoid ../src/NppCommands.cpp:1790:24: warning: conversion from ‘int’ to ‘UCHAR’ {aka ‘unsigned char’} may change value [-Wconversion]

Close #15001
2024-04-15 03:15:59 +02:00
ozone10 7cfa79b8cd Allow Ctrl-TAB to switch tabs in FindReplace dialog
Fix #14975, close #14988
2024-04-15 02:54:14 +02:00
Don Ho 896d78a5db You can't criticize Roman numeral 11 in China 2024-04-14 22:20:05 +02:00
xomx 126505180f Fix potential crash when crossing the 2GB file size threshold
To be able to work with 2GB+ files, we have to use the Scintilla SC_DOCUMENTOPTION_TEXT_LARGE flag.

Until now, this flag was only used if a file > 2GB was to be loaded. For files smaller than 2GB or newly created empty ones, it was not used. This left the room for a Notepad++ crash situation because of the user has been left the possibility to cross this threshold (e.g. by pasting a data which in sum with the already existing ones in the Notepad++ filebuffer exceeds that 2GB...)

So one has two options: either a complex monitoring of the Notepad++ filebuffers size and reloading these with that large-flag when reaching the 2GB or simply using that large-flag as the default one from the start (which is what this patch does...).

Fix #14981, close #14982
2024-04-14 14:35:26 +02:00
ozone10 80e8a0dbe1 Add dpi messages
- process WM_DPICHANGED_AFTERPARENT message
- remove unused function
- tweak 2 switches, which use enums to avoid warnings

ref #14959

Close #14980
2024-04-14 14:14:28 +02:00
Don Ho 906f6e4386 Revert "Fix Korean IME append extension issue"
This reverts commit 6330a68, due to regression reported in #14400.

Fix #14400, fix #14973, close #14593
2024-04-13 19:41:59 +02:00
xomx 18815de8ac Fix multi-edit resists escape after typing issue
Add Multi-Edit mode canceling by Esc possibility

Fix #14649, close #14956
2024-04-13 10:31:04 +02:00
ozone10 e0bb723700 Improve HiDPI compatibility for tab control labels
Close #14958
2024-04-11 18:21:14 +02:00
PeterCJ 8f24e89824 Add syntax highlighting for Go/Golang
(as done in SciTE, Go/Golang can use cpp lexer)

Fix #8090, close #14966
2024-04-11 17:58:43 +02:00
ozone10 5b8e13ab9b Refactor controls in Find & Replace dialog to improve compatibility with HiDPI
Close #14948
2024-04-11 17:02:06 +02:00
ozone10 fc52cd3f4f Use dpi scaled fonts for some controls
-  prepare static dialog for hiDPI

ref: #14959

Close #14947
2024-04-11 11:09:09 +02:00
Don Ho ddc080785d Merge branch 'xomx-fix_possible_2GB+_files_loading_Scintilla_exception' 2024-04-09 19:51:45 +02:00
Christian Grasser 8d3d8aa642 Fix gcc compiler warnings\errors
- avoid upper/lowercase issue for #include <windowsx.h>
- casts to avoid warning: conversion from ‘int’ to ‘UCHAR’ {aka ‘unsigned char’} may change value [-Wconversion]
- cast to avoid warning: conversion from ‘int’ to ‘BYTE’ {aka ‘unsigned char’} may change value [-Wconversion]
- avoid warning : delete called on non-final 'FileDialogEventHandler' that has virtual functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]
- avoid warning : warning: extra ';' [-Wpedantic] in BabyGrid.cpp

Close #14950
2024-04-07 12:19:52 +02:00
Don Ho 318c9a994c Merge branch 'fix_possible_2GB+_files_loading_Scintilla_exception' of https://github.com/xomx/notepad-plus-plus into xomx-fix_possible_2GB+_files_loading_Scintilla_exception 2024-04-06 15:45:19 +02:00
ozone10 1f4cbdb8b7 Fix close button disappeared issue in Find&Replace dialog
Fix #14940, close #14941
2024-04-05 19:06:23 +02:00
xomx 6afcb73557 Fix possible 2GB+ files loading Scintilla exception
Previously there was the 4096 MB max limit, so when e.g. user set this 4GB threshold and then tried to open any 2GB+ file, the Scintilla CellBuffer::Allocate method throwed a std::runtime_error because currently the Notepad++ does not use the SC_DOCUMENTOPTION_TEXT_LARGE in such a case.
2024-04-05 18:55:07 +02:00
Don Ho 903d47b2eb Reduce compiling warning
Close #14924
2024-04-05 03:46:27 +02:00
ozone10 6204f00e88 Use dark theme on checkbox buttons on Windows 11
-  replace style and class strings with macro

Fix #14929, close #14930
2024-04-03 02:45:38 +02:00
Don Ho a61f3ab13f Update slovenian.xml 2024-04-03 02:29:55 +02:00
molsonkiko 2a6382b4a6 Enhance Notepad++ closing speed by not scanning for URLs
Close #14931
2024-04-03 01:28:41 +02:00
Coises 0a7295878d Fix a performance issue due to URL recognization
The function "addHotSpot" can become very slow when the screen contains certain sequences of characters that look like URLs but are not valid, due to a form of backtracking. This change eliminates the possibility of backtracking.

This commit does two things:

First, it tightens the requirements for “looks like a URL” by checking the scheme earlier in the process. That is necessary to keep the next step from skipping valid URLs in reasonable contexts.

Second, once the beginning of a potential URL passes the tighter initial scanning and the end of the URL is found, we “commit” to that portion of the line. If the potential URL fails InternetCrackUrl validation, we restart scanning from the end of of the string that looked like a URL but wasn’t, rather than from just after the scheme.

Fix #13916, close #14900
2024-04-03 01:18:56 +02:00
ozone10 29fcd1ac91 Readd dpi API
ref https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14871#issuecomment-2002547565

Close #14876
2024-04-02 01:44:52 +02:00
ozone10 243112d04d Fix Dark Mode Menu Bar cluttered issue
Use correct enums for dark mode menubar

Fix #14910, fix #10130, close #14911
2024-04-01 17:10:28 +02:00
Don Ho 60034edf37 Fix debug info display regression
This regression was introduced by 83f0232d91

Fix #14921
2024-03-30 23:44:09 +01:00
Don Ho 26647ac9fd Notepad++ release 8.6.5 2024-03-30 01:02:22 +01:00
Don Ho bbeaafac8b Fix period backup crash due to the dead lock of std::lock_guard
The crash occurs because the thread terminates the task prematurely due to PostMessage’s nature. As a result, FileManager::backupCurrentBuffer() is always executed by the main thread, leading to a deadlock ( due to "std::lock_guard<std::mutex> lock(backup_mutex);") on the 2nd main thread’s entry and causing the crash. Here the explanation:
"If lock is called by a thread that already owns the mutex, the behavior is undefined: for example, the program may deadlock."
ref: https://en.cppreference.com/w/cpp/thread/mutex/lock

Using SendMessage instead of PostMessage ensures that the thread executes the task from the beginning to the end and keeps the mutex until the entire operation is terminated. Therefore, the race condition is prevented by the mutex lock while the 2nd thread tries to access the same code/zone.

Fix #14906, close #14917
2024-03-29 16:14:44 +01:00
ozone10 30f48aae1e Insert "change history" styles to Style Configurator for themes if absent
Close #14905
2024-03-27 19:10:19 +01:00
ozone10 b31e7a31e0 Change History GUI enhancement and tweaks
- add 'Go to setting' for other Change History styles
- make spacing consistent in preference
- minor warning fix

Close #14883
2024-03-27 17:08:13 +01:00
Don Ho 12c6777bc1 Fix some "Go to settings" in Style Configurator go to wrong section
Fix #14882, close #14903
2024-03-24 14:06:17 +01:00
Don Ho 52fa5a3b8a Fix Mouse Wheel Scrolling in Shortcut Mapper even nothing to scroll
Reduce also Shortcut Mapper memory use.

Fix #14895, close #14896
2024-03-24 11:25:14 +01:00
Matteo Concato 71a12c4289 [xml] Fix & update italian.xml
Close #14898
2024-03-24 11:21:53 +01:00
molsonkiko cccd99b791 Fix URLs are not detected after a "Replace All" regression
Fix #14864, close #14889
2024-03-21 23:54:52 +01:00
Don Ho d7011c41bf Modernize BabyGrid.cpp
1. Isolate the local variables.
2. Initialize the variables.
3. Prevent negative index in the tables.
4. Rename few variables.

Close #14893
2024-03-21 21:09:36 +01:00
xomx 109600aa50 Enhance losing session while power outrages remedy
Fix possible session backup swapping when no session.xml file.
The ReplaceFile WINAPI failed when the session.xml file replaced did not exist.

This commit follows the commit aa3777786d

Close #14887
2024-03-21 17:55:34 +01:00
Don Ho 0bc28df616 Reformat BabyGrid.cpp for a good readibility and nothing more
Close #14886
2024-03-20 19:26:23 +01:00
xomx 73bc79ee50 Fix launching Shortcut Mapper makes app crash
Fix memory overwriting bug by BabyGrid:
BabyGrid code was overwriting foreign memory on its initialization and deinitialization. At that time (WM_NCCREATE, WM_NCCALCSIZE, WM_CREATE and WM_NCDESTROY) the relevant FindGrid func returns -1, which was used as an index pointing to a memory area before the whole BGHS object (BGHS[-1]...)!

This was a long-standing hidden bug that only started to manifest itself probably when the app memory layout shifted somehow and important objects/data started to be overwritten, resulting in the visible app crashes.

Fix https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14855#issuecomment-2001066992 , https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14871#issuecomment-2002485089
2024-03-20 03:49:32 +01:00
MarkusBodensee 6b0274fdf2 Update german.xml
Update german.xml with latest changes for v8.6.5 release.
Adjust and fix some more translations.

Close #14879
2024-03-19 16:31:05 +01:00
Juan 33ac6e7ecf [xml] Update galician.xml
Close #14873
2024-03-17 19:39:59 +01:00
Juan 13dcdd5fb4 [xml] Update spanish.xml
Close #14872
2024-03-17 19:38:23 +01:00
schnurlos 6e77795f89 [xml] Update german.xml
Close #14803
2024-03-17 19:37:06 +01:00
Andrei Miloiu bdbd289d6c Update romanian.xml
Close #14868
2024-03-17 19:34:21 +01:00
Don Ho 590ea74bee Fix NUL characters file corruption after power outrages (1st step solution)
=========
Sernario:
=========
When a user modifies a file in Notepad++, and the time of periodic backup (defaulted to 7 seconds) is reached, the backup of the modified file is being written. However, if a power outage occurs during this precise moment while the file is being written, file corruption may occur.

=======
Remedy:
=======
The goal is to maintain a non-corrupted file sample even during power outages. Here are the steps:

0. Begin
1. Write the file A as A.temp
2. Replace A by A.temp
3. End

During these steps, the cutoff can happen at any moment, but the user will always have a non-corrupted file sample (either A or A.temp).

=====
Note:
=====
The solution is only applied to "new #" files, since these files are generally small in length and do not have a second "physical" file existing on the hard drive.

ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/6133#issuecomment-1987037043

Fix #6133, close #14860
2024-03-17 19:23:51 +01:00
Don Ho aa3777786d Remedy losing session problem after the power outrages
In case of "session.xml" being corrupted after the power outrages, "session.xml.inCaseOfCorruption.bak" will replace "session.xml" on the next Notepad++ startup.

Fix #14781, close #14858
2024-03-17 17:55:50 +01:00
Don Ho 999b4d1887 Revert "Improve hiDPI appearance for some DM elements"
This reverts commit 356d5cd072.

Close #14875
2024-03-17 17:39:28 +01:00
Don Ho 10305ebded Revert "Use undocumented dpi API to support win7"
This reverts commit c8a2bcb6b0.

ref: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/14855#issuecomment-2002031940
2024-03-17 16:13:12 +01:00
xomx 45cdbbfe15 [xml] Update czech.xml to v8.6.5
Close #14869
2024-03-17 00:08:03 +01:00
Karlo-F 2a747e496e [xml] Update croatian.xml to v8.6.5
Close #14862
2024-03-16 19:27:13 +01:00
Hugo Carvalho 7f74bc0f9b [xml] Update portuguese.xml
Close #14863
2024-03-16 19:25:09 +01:00
Matteo Concato c4e37e8167 [XML] Update italian.xml v8.6.5
Close #14861
2024-03-15 01:20:12 +01:00