-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
Description of the Issue
When styling text using Search > Mark All > Using Nth style , I'd like to be able to color ONLY the text I currently have selected, or only the current word at the caret if no selection is active. This goes against the menu item's "Mark ALL" concept but in certain circumstances it can be valuable to do this. One circumstance is when copying styled text to the clipboard and wanting to avoid redundant data.
Some other user requests for this:
- https://community.notepad-plus-plus.org/topic/20466
- https://community.notepad-plus-plus.org/post/59207
I alluded to the user needing this feature when I added the "Copy Styled Text" capability to Notepad++ via this issue and its PR: #8943 , specifically in these comments:
- Add "Marked Style N text to Clipboard" menu commands #8943 (comment)
- Add "Marked Style N text to Clipboard" menu commands #8943 (comment)
Steps to Reproduce the Issue
- Create some text in a Notepad++ tab:
Jack and Jill
Went up the hill
To fetch a pail of water
Jack fell down
And broke his crown,
And Jill came tumbling after.
Up Jack got
And home did trot,
As fast as he could caper;
And went to bed
And plastered his head
With vinegar and brown paper.
When Jill came in
How she did grin
To see Jack's paper plaster;
Mother vexed
Did whip her next
For causing Jack's disaster.
- Place the caret inside the word
Jackin the first line - Invoke Search menu > Mark All > Using 1st style
- Observe all occurrences of
Jackare styled in the cyan color:

Expected Behavior
I expected a way to have only the currently selected text, or the current word at the caret, to be styled with one of the five styling colors, not all prior and future instances of the text.
Actual Behavior
All occurrences of identical text were styled with the color I chose. This was not what I needed.
Debug Information
Notepad++ v7.9.1 (64-bit)
Build time : Nov 2 2020 - 01:07:46
Path : C:\...........\npp.7.9.1.portable.x64\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 1809
OS Build : 17763.1577
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll