184 Commits

Author SHA1 Message Date
Don Ho
a8dfadefe8 Use an explicite function name 2025-11-24 17:52:00 +01:00
ozone10
4184d7cbbb Fix wrong keywords used for HTML lexer
- fix some warnings
- remove unused function

Fix #17220, close #17221
2025-11-24 16:33:27 +01:00
ozone10
c696f6fa79 Optimize constants in ScintillaEditView.h to reduce binary size
by using inline/static constexpr.

Fix #17198, close #17199
2025-11-22 16:07:10 +01:00
Don Ho
ea572cec88 Code enhancement: Make returned value safer
A crash regression (Fixed by cf0a5c8edc) has been caused by the returned null pointer.
This commit makes the returned value safer: use empty string instead.

Close #17212
2025-11-21 19:57:07 +01:00
ozone10
c6aa7f9ec8 Code enhancement: Remove old dpiManager
- fully replace it with V2
- add text scaling support to task dialog list
- modernize task dialog code
- clean and remove unused include headers

Close #17189
2025-11-20 17:35:00 +01:00
ozone10
fa2fbbfb95 Fix extra semicolon and some override warnings
ref https://github.com/notepad-plus-plus/notepad-plus-plus/pull/17117#discussion_r2486784682

Fix #16645, close #17137
2025-11-04 00:19:17 +01:00
Don HO
8149f72717 Disable ANSI under full Unicode system & fix switching encoding not working
While **Use Unicode UTF-8 for worldwide language support** is checked:

1. ANSI commands is disabled.
2. Encoding "ANSI" & "Applied to opened ANSI file" options are disabled in "New Document" section of Preferences.
3. Open the "single byte" files with the old code page, if the encoding detection finds nothing.

Fix #17057, fix #17033, close #17080
2025-10-29 15:41:08 +01:00
ozone10
2170115d1e Fix GCC warnings
- Wunknown-pragmas
- Wtype-limits
- Wconversion-null

Fix #17106, close #17105
2025-10-27 19:26:10 +01:00
Don Ho
f68e1d1fd3 Fix a logic error
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16889#issuecomment-3328064735
2025-09-24 14:54:43 +02:00
Don Ho
f44795a69e Fix column mode pasting to multi-selection issue due to different EOL
Fix #16889
2025-09-24 02:26:52 +02:00
mpheath
3546a4d97e Fix DOCTYPE styling in xml and html
Fix #17012, close #17018
2025-09-22 19:53:07 +02:00
Don Ho
be59048c5e Fix filling Find what length not accurate problem
+ a lot of refactoring

Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16955#issuecomment-3287770729

Fix #16955, fix #16992, close #17001
2025-09-18 01:14:13 +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
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
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
Christian Grasser
c367ab8966 Some code improvements
Close #16876
2025-07-30 00:06:08 +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
f5a34dcc9f Enhance "Go to settings": guide users to the related setting explicitly
Fix #16846, close #16847
2025-07-21 23:45:01 +02:00
rdipardo
19267aa0ea Make raw string syntax highlighting work for Golang
Enable the raw string lexer property for Golang.
Also: add a new 'STRING RAW' style to all Golang themes.

Fix #16609, close #16615
2025-06-04 14:55:30 +02:00
Don Ho
1f48115666 Fix regression of folding state not being remembered through sessions
The regression is introduced by:
83755ca155 (diff-d88ddee57a027ab23daf332c4778ced0cee352edcb34efdda1b218e8a75c61b2L2636)

The culprit of this regression is the deletion of following 4 lines in the commit above:
```
void ScintillaEditView::fold(size_t line, bool mode, bool shouldBeNotified/* = true*/)
{
	auto endStyled = execute(SCI_GETENDSTYLED);
	auto len = execute(SCI_GETTEXTLENGTH);

	if (endStyled < len)
		execute(SCI_COLOURISE, 0, -1);
```
The method "ScintillaEditView::fold()" is called not only on manual folding by the users, but also on:

1. startup's loading session to restore the folding state programmatically.
2. after startup, switching among the documents to restore the folding state programmatically.

The above lines are important for the case 1.

However, these lines are necessary only on the first load of each file after the startup of Notepad++.
"execute(SCI_COLOURISE, 0, -1);" needs to be run for once (the case 1), not twice or more (the case 2).

So if there's a way to detect if a document has been run "execute(SCI_COLOURISE, 0, -1);" once (in the case 1),
and don't run it again (the case 2), it will save the time to switch among the document.

Fix #16597, close #16599
2025-05-29 17:54:14 +02:00
Don Ho
8696d28cfd Fix typos (part 2) 2025-05-21 17:57:33 +02:00
Don Ho
b742c540bb Fix typos
and clean-up.

Close #16576
2025-05-21 03:16:30 +02:00
Don Ho
0f79a51646 Fix an unresponsive issue due to hide lines
Fix swiching back to document which has processed hide lines makes Notepad++ unresponsive due to an infinite loop.
Fix also setting language makes hiding lines unhidden issue.

Fix #16316, close #16512
2025-05-05 15:52:03 +02:00
PeterCJ
19e356d616 Add ErrorList syntax highlighting
Enable the errorlist lexer
- Associates ".err" and ".log" with Language > E > ErrorList
- When in ErrorList file, toggling View > Show Symbols > Show Control Characters & Unicode EOL will show/hide the whole `ESC[1;31m` sequence, not just the ESC symbol

Related issues/topics:
- https://community.notepad-plus-plus.org/topic/26801/reading-typescript-of-terminal-session
- https://community.notepad-plus-plus.org/topic/23787/show-printable-ascii-characters-only
- https://community.notepad-plus-plus.org/topic/23147/missing-lexers-from-lexilla
- https://community.notepad-plus-plus.org/topic/22994/ansi-escape-sequences-color-rendering
- https://community.notepad-plus-plus.org/topic/16612/interprete-ansi-color

Fix #16437, fix #8078, close #16480
2025-05-02 04:33:56 +02:00
Don Ho
51449b09de Fix search result cut off result content due to nul characters ('\0')
Fix #6281, fix #15216, fix #16466, close #16469
2025-04-29 22:51:47 +02:00
Don Ho
dba2a9890e Add "Make the selected text foreground a single color" option on GUI
and remove the usage of zero length enableSelectFgColor.xml file.

Close #16391
2025-04-07 23:35:18 +02:00
xomx
2ae5df05b9 Fix "Keep selection when right-click outside of selection" not work issue
Make right-click message handler x-margin calculation right.
Previously, the incorrectly used unsigned variable (size_t) overflowed with negative numbers due to incorrect calculation of margin size.x (where possible horizontal scrolling was not taken into account...).

Fix #16325, close #16332
2025-04-03 17:31:28 +02:00
Don Ho
39d9525845 Fix switching different languages regression
This regression was introduced by de9ffd2.

Fix #16309, close #16312
2025-03-21 01:13:38 +01:00
Don Ho
0ead95eb86 Fix incorrect syntax hiliting by switching from wrong langType to right one
Regression was introduced by commit b2152d983e3b20aed7f687ba1d9e916ae6065b24

Fix #16271, close #16281
2025-03-15 03:52:50 +01:00
Don Ho
8793825b34 Fix FuncList not refresh correctly due to large files perf improving
Fix #16221 completely
2025-03-07 17:02:20 +01:00
Don Ho
ba3b955a45 Fix syntax hiliting err while switch lang on untitled doc regression
The regression was introduced by commit b2152d983e3b20aed7f687ba1d9e916ae6065b24

Fix #16250, close #16254
2025-03-06 21:39:20 +01:00
Don Ho
83755ca155 Improve folding/unfolding performance for large files
- Use the Scintilla dedicated command SCI_FOLDALL to replace the inefficient loop for "Fold All" command.
- Fix "Fold level" & switching back to large files folding performance.
- Refactoring the hide/show lines functions.

Note that there might be a regression of URL link:
https://github.com/notepad-plus-plus/notepad-plus-plus/pull/16200/files#r1961937279

The commit is based on code of #16064.

Fix #16064, close #16200
2025-02-22 17:23:58 +01:00
xomx
fd2157729a Make other existing Scintilla rendering technology modes accessible
Adding support for other Scintilla rendering modes:
* SC_TECHNOLOGY_DIRECTWRITERETAIN (2)
* SC_TECHNOLOGY_DIRECTWRITEDC (3)
* SC_TECHNOLOGY_DIRECT_WRITE_1 (4)

Fix #16126, close #16201
2025-02-19 18:42:39 +01:00
PeterCJ
4f295de864 Adds SAS programming language support
Enable Sctintilla's SAS lexer, populate langs.model, stylers.model, and themes.
(includes keyword lists from UDLs, notepad4, and SAS documentation)

Fix #16148, close #16183
2025-02-16 15:45:47 +01:00
Don Ho
7ac7f9a0e6 Remove unecessary lines for accelerating switching into large files
ref: #16064
2025-02-14 18:05:41 +01:00
Don Ho
0b98007883 Minor refactoring & rename varibles 2025-02-13 15:12:45 +01:00
Don Ho
5dfc9709c9 Fix a syntax highlighting regression while switching among UDL files
Fix #16154, close #16181
2025-02-13 02:40:38 +01:00
xomx
abbe60e74c Allow using the Scintilla DirectWrite in non-Core Windows Server
Fix #15916, close #15921
2025-02-09 12:28:06 +01:00
Don Ho
b2152d983e Optimize switching programming language performance for large files
Fix #16106, close #16109
2025-02-07 19:39:57 +01:00
Don Ho
6fd3830b42 Add NPPM_ADDSCNMODIFIEDFLAGS to fix regression for Plugins
Add **NPPM_ADDSCNMODIFIEDFLAGS** message for plugins which need the SCN_MODIFIED notification of other events.

BOOL NPPM_ADDSCNMODIFIEDFLAGS(0, unsigned long scnMotifiedFlags2Add)
Add needed SCN_MODIFIED flags so your plugin will recieve the notification SCN_MODIFIED of these events for your specific treatments.
By default, Notepad++ only forwards SCN_MODIFIED with the following 5 flags/events SC_MOD_DELETETEXT | SC_MOD_INSERTTEXT | SC_PERFORMED_UNDO | SC_PERFORMED_REDO | SC_MOD_CHANGEINDICATOR to plugins.
If your plugin need to process other events of SCN_MODIFIED, you should add the flags you need by sending this message to Notepad++, just after recieving NPPN_READY.
wParam: 0 (not used)
lParam[in]: scnMotifiedFlags2Add- Scintilla SCN_MODIFIED flags to add.
Return TRUE

Ref: https://community.notepad-plus-plus.org/topic/26588/notepad-v8-7-6-released/2?_=1738167940554

Fix #16121, close #16120
2025-01-31 18:25:04 +01:00
Don Ho
8042e50b19 Remove unnecessary calls to remedy the plugin issue (regression)
Ref: https://community.notepad-plus-plus.org/topic/26567/notepad-v8-7-6-release-candidate/6?_=1737703232720
2025-01-24 08:18:27 +01:00
Don Ho
e28324b8d0 Fix reload losing syntax highlighting regression
The regression is introduced by:
de9ffd2ea8

Fix #16027, close #16042
2025-01-11 04:48:57 +01:00
rdipardo
9e1db77f81 Fix literals wrong style for server side JavaScript
Add styles for SCE_HJ_TEMPLATELITERAL and SCE_HJA_TEMPLATELITERAL in styles.xml.

Fixes #15821, close #15822
2025-01-09 11:29:05 +01:00
Don Ho
c5dd85cd93 Improve performance: Optimize activateBuffer function
Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/15952#issuecomment-2567521808

Close #16010
2025-01-03 14:08:12 +01:00
Don Ho
de9ffd2ea8 Enhance large files with syntax highlighting performance
Fix #15952, close #15981
2024-12-30 16:06:35 +01:00
Don Ho
2f1cdbbef8 Fix nfo file losing modification issue (regression)
The regression is introduced by:
dd0b557e14 (diff-d88ddee57a027ab23daf332c4778ced0cee352edcb34efdda1b218e8a75c61b2R1864)

Fix #15964, close #15969
2024-12-20 10:58:33 +01:00
Don Ho
dd0b557e14 Fix encoding of nfo file cannot be changed bug
Fix #8823, fix #9153, fix #13905, close #15902
2024-12-03 17:00:53 +01:00
Alan Kilborn
b8224808bd Add ability to open/copy selected files from Search-results
Add ability to open/copy selected files from Search-results, not always ALL files.

Fix #15741, close #15763
2024-11-14 16:01:02 +01:00
Don Ho
ad34461261 Make left behide hide line close marker removable
Fix #15713
2024-10-18 03:57:03 +02:00
Adrian Kulawik
5d2bea5b97 Fix hanging issue while hiding lines
Fix #15630, close #15632
2024-10-18 03:55:50 +02:00