Skip to content

Style Token not applied consistently within words #9751

@juvtib

Description

@juvtib

I noticed an issue with the "style token" feature. The problem is that styling is not applied consistently within words.

Case 1

  1. Close and open Notepad++.
  2. Type "training" on line 1 and "train" on line 2.
  3. With nothing selected, right-click on "train" on line 2 > Style token > Using 1st Style.

Under these conditions, only "train" on line 2 is styled.

screen capture where line 2 is styled


Case 2

  1. Close and open Notepad++.
  2. Type my test: "training" on line 1 and "train" on line 2.
  3. Open the Find dialog.
  4. Clear 'Match whole word only'.
  5. With nothing selected, right-click on "train" on line 2 > Style token > Using 1st Style.

Under these conditions, "train" on lines 1 and 2 are styled: The token will be styled within words.

screen capture where both lines are styled

Style Token will continue to match within words after opening the Find dialog once.

Expected Behavior

I am accustomed to case 2 where style applies to matches within words. This is how Notepad++ operates most of the time.

It doesn't make sense that a Find dialog option would affect Style Token. I suggest decoupling Style Token from the Find dialog. If people want to control this behavior then I suggest adding a formal preference: Style Token Matching.

Debug Information

Notepad++ v7.9.5 (32-bit)
Build time : Mar 21 2021 - 02:09:07
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2009
OS Build : 19042.867
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions