Notepad++ v7.9.5 released
-
I noticed an issue with the “style token” feature. The problem is that styling is not applied consistently within words.
We have line 1: “training” and line 2: “train”.
Case 1: If I select “train” on line 2 and style that then only “train” on line 2 is styled.
https://i.imgur.com/D18IOEx.png
Case 2: If I select “train” on line 1 and style that then “train” on lines 1 and 2 are styled.
https://i.imgur.com/QbbT21R.png
I tried older versions of Notepad++, through 7.8, and deleted my %appdata%\notepad++ folder between tests, but the older versions have the same behavior. It must be a coincidence I noticed this now.
I’m accustomed to case 2 where “train” is always styled: even within words. Somehow, that is the way styling worked out in the past.
-
@Michael-Mientus-0 said in Notepad++ v7.9.5 released:
noticed an issue with the “style token” feature. The problem is that styling is not applied consistently within words.
It really is a bit, well, awkward, isn’t it?
Here’s how it works:If you select some text, if that text is a full “word”, then N++ will check the Match whole word only setting in the Find dialog to decide what to do. If that is ticked, it will only do the selected word occurrences and NOT the occurrences where that word is part of a larger word. For all other input conditions it will also do whole words and parts of longer words.
That description might be hard to understand; it is even harder to remember.
-
@Alan-Kilborn said in Notepad++ v7.9.5 released:
the Match whole word only setting in the Find dialog
In my mind, the dialog box is modal. Also, I don’t have that option selected.
So how should I change the mode?
-
@Michael-Mientus-0
Hmm, actually my earlier description was something I had documented for how it worked, but my notes are quite old and maybe something in the software has changed (or my notes were wrong). I’ll try to work with it and figure it out…
-
@Michael-Mientus-0
Continued experimentation shows me that it works as I described, with one addition: If you have no selection but your caret is sitting in the middle of a word when you invoke the style command, it acts like I said earlier when I said “If you select some text, if that text is a full “word””.
But otherwise, I cannot duplicate your result from:
Case 1: If I select “train” on line 2 and style that then only “train” on line 2 is styled.
with the caveat of:
I don’t have that option (match whole word) selected
Also:
In my mind, the (Find) dialog box is modal.
Well, it’s not.
And, even if it were, how is that relevant to the current discussion?So how should I change the mode?
No idea, sorry.
-
- Close and open Notepad++.
- Type my test: “training” on line 1 and “train” on line 2.
- 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.
- Close and open Notepad++.
- Type my test: “training” on line 1 and “train” on line 2.
- Open the Find dialog.
- Clear ‘Match whole word only’.
- 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.
You could not reproduce my issue because Style Token will continue to match within words after opening the Find dialog once. This might also explain why I haven’t seen this issue before. I must have always used the Find dialog at least once before styling tokens.
With regard to the user interface, I’m saying there is no logical connection between the Find dialog box and Style Token. I suggest decoupling Style Token from the Find dialog. If people still want to toggle the behavior then create a new preference.
-
@Michael-Mientus-0 said in Notepad++ v7.9.5 released:
You could not reproduce my issue because Style Token will continue to match within words after opening the Find dialog once.
There is a similar open issue regarding Match case.
See Applying Style Tokens is case sensitive until search is done.With regard to the user interface, I’m saying there is no logical connection between the Find dialog box and Style Token. I suggest decoupling Style Token from the Find dialog. If people still want to toggle the behavior then create a new preference.
As I hinted earlier, I agree this isn’t the best design.
But we’re not the developers here, just a user community to discuss things and help each other out. -
@Alan-Kilborn said in Notepad++ v7.9.5 released:
There is a similar open issue regarding Match case.
See Applying Style Tokens is case sensitive until search is done.I found that thread earlier but did not recognize it at the time. It seems similar.
-
-
It seems with this last release, the “Default Directory” preference no longer works. I always use the Default Open/Save file directory as “Remember last used directory”, but the location is always the Notepad++ installation folder (In Program Files). I tried to set manually the path, but this method worked only once. On the second test, the location returned to the Notepad++ installation folder.
-
@Jean-Michel-Coinus said in Notepad++ v7.9.5 released:
Default Open/Save file directory as “Remember last used directory
but this method worked only once. On the second test, the location returned to the Notepad++ installation folder.
I also see this behavior, when I set to “Remember last used directory” (which I don’t normally use).
Perhaps opening an issue on it (see FAQ) is the way to proceed? -
I have updated to this version and now the documents I have opened including the newly created one being closed and do not reopen on restart.
I’m so used to this, I’m kindly asking you, please suggest to me the oldest version where this functionality persists, I’d like to downgrade. Thanks!
(edited)
Even tho I have<GUIConfig name="RememberLastSession">yes</GUIConfig>
in Config.xml -
I am using version 7.9.5, and it does remember the last session, with all the previously opened files.
Check in “Preferences”, “Backup”, in the panel “Session snapshot and periodic backup”, that the checkbox “Remember current session for next launch” is checked.
-
@NippurDeLagash Thanks!
I have that option checked.
I tried unchecking it, restarting the notepad, checking it again, but regardless of whether I have it enabled or not Notepad++ on exit still prompts me do I want to save my files and does not save the session. -
Update
I have reinstalled the app without saving my custom setting on uninstall and it worked.
Thanks! -
I have a weird problem with some Unicode files with Chinese chars not loaded or recognized properly.
If I load the file in windows notepad and save it, the Notepad++ shows and recognize perfectly…
I leave a little test file in my server for you to test…
Test file -
@xagaba said in Notepad++ v7.9.5 released:
I have a weird problem with some Unicode files with Chinese chars not loaded or recognized properly.
Suggest looking at THIS and seeing if that has any impact.
-
Hello, @xagaba, @alan-kilborn and All,
I downloaded your
Test.txt
file and, after numerous tests, I’ve got the solution ! I even think that I’m going to create aGitHub
issue in order to improve the N++ auto-detection of the right encoding ;-))But first, to correctly answer you, I need three additional pieces of information :
-
When you’ve just opened the
Test.txt
file, what encoding do you see, in the right part of the status bar ? -
Could your provide the
Debug Info...
information of your Notepad++ configuration ( Menu option? > Debug Info...
) -
Could you also specifiy what is your current N++ font ?
- In
Settings > Style Configurator > Global styles > Global override > Font Style > Font Name
( IF theEnable global font
option is tiched )
OR
- In
Settings > Style Configurator > Global styles > Default Style > Font Style > Font Name
( IF theEnable global font
option is NOT tiched )
- In
TIA
Best Regards,
guy038
-
-
Sorry, I try it but no luck with that…
Seems to me that it’s not a rendering issue here…
Thanks anyway ! -
@guy038 said in Notepad++ v7.9.5 released:
When you’ve just opened the Test.txt file, what encoding do you see, in the right part of the status bar ?
Unix (LF) ANSI
Could your provide the Debug Info… information of your Notepad++ configuration ( Menu option ? > Debug Info… )
Notepad++ v7.9.5 (64-bit)
Build time : Mar 21 2021 - 02:13:17
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 2009
OS Build : 19042.928
Current ANSI codepage : 1252
Plugins : DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dllCould you also specifiy what is your current N++ font ?
Let me know if you need anything else…
Regards !