Smart Highlight not working
-
I did search the forum and the web in general but I was not able to find a solution to my issue. I did try a couple things listed in other posts.
I have used Notepad ++ for over 10 years and up until the last update I have had no issues.
As of 8.7.1 My smart highlighting is not working.
I checked Preferences > Highlighting - Highlight matching Tags and Smart Highlighting are enabled. I have disabled and re-enabled. I have changed multiple options in the Highlighting settings.
Style Tokens do highlight the multiple instances of tags or words.
I have uninstalled and reinstalled. When I uninstalled I removed all directories related to NPP (Install Folder and %APPDATA%\Roaming)
I have changed from 32 bit to 64 bit. I originally stayed with 32 bit due to plug-in compatibility.Video with input overlay so you can see mouse clicks and double clicks. Grey bar across the top to hide personal information.
https://drive.google.com/file/d/10avx-310JZet_L58weFm79Havt-hEsfE/view?usp=drivesdk
same video different host
https://youtu.be/FNJShIZfL_YAny help would be appreciated.
-
@Michael-Belew ,
Best you post the picture or video here, as I don’t follow links posted by most people, and certainly not first posters. I don’t suspect many of us do as that invites bad actors to compromise our systems.
If it can’t pass the forums checks, it won’t make it to be viewed here meaning I don’t want to follow it either. -
You can also use a URL checker to check the safety of a link. Google has its own version of a URL checker called Google Transparency Report. To check the safety of a link, all you have to do is safely copy the link and paste it into Google’s URL checker. To safely copy a link, right-click and choose “copy link” from the options that appear. When copying the link, be careful to not click on it accidentally.
Second the forum has no obvious way to post a video, only images. I provided 2 links to the same video, both Google owned sources, to try and make people more comfortable.
I have converted the video to make it an animated GIF, but all of the converters online limit this length of video to 8 fps, which may make it difficult to see double clicks and other fidelity.
-
@Michael-Belew ,
Still seems like a lot of work just to see if it’s not hazardous without having to click it. Be that as it may, I think I see what you’re referring to. Can you post your debug information and maybe more knowledgable people will be able to help you? It seems I may have duplicated your issue myself. I used to think it was confusing when all those words were getting highlighted, but now I noticed my own version isn’t doing it anymore either, so I guess I have to add a me too, to this issue.Debug:
Notepad++ v8.7.1 (64-bit) Build time : Oct 31 2024 - 00:48:56 Path : C:\Program Files\Notepad++\notepad++.exe Command Line : Admin mode : OFF Local Conf mode : OFF Cloud Config : OFF Periodic Backup : ON OS Name : Windows 10 Home (64-bit) OS Version : 22H2 OS Build : 19045.5131 Current ANSI codepage : 1252 Plugins : ComparePlus (1.2) CSVLint (0.4.6.7) CsvQuery (1.2.9) EnhanceAnyLexer (1.4) GitSCM (1.4.9.1) MarkdownViewerPlusPlus (0.8.2) mimeTools (3.1) NppConverter (4.6) NppExec (0.8.8) NppExport (0.4) NppPluginDemo (4.4) NppSnippets (1.7.1) NppUISpy (1.2) PythonScript (2) TakeNotes (1.2.7) XMLTools (3.1.1.13)
-
YouTube links are generally reasonable for people to click on (especially since the forum won’t let users obfuscate the real URL vs the apparent URL), though I would recommend using the full URL rather than the
youtu.be
shortened URL.On to your problem: I cannot tell for sure, because you haven’t posted the text for any data that replicates the problem for us to copy/paste into our Notepad++ instances, but my guess is that you have “must match whole word” in your options, and because of the quotes and equals and the specific data “words” that you are highlighting, it doesn’t match N++'s definition of “whole word”. If you had shared a screenshot of your Highlighting preferences, that would have been helpful; but for now, check those settings, and compare to the User Manual description (https://npp-user-manual.org/docs/preferences/#highlighting)
-
@PeterJones ,
Fair enough. :-) I know you meant @Michael-Belew , but I’m as guilty, too…so…
Below is the screenshot and enough code to try for comparison.
Here is a screenshot of the word (that you helped me with for the UDL)with
selected along with theHighlighting
preferences section showing. Only the one selected is highlighted, notice the ones underneath are not.
Code:
set procedure to containerobjects.cc additive ** END HEADER -- do not remove this line // // Generated on 04/09/2023 // parameter bModal local f f = new PlainObjectListForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class PlainObjectListForm of FORM with (this) onOpen = class::FORM_ONOPEN onClose = class::FORM_ONCLOSE doubleBuffered = true metric = 6 // Pixels colorNormal = "Gray" height = 529.0 left = 110.0 top = 29.0 width = 1092.0 sizeable = false pageno = 1 refreshAlways = false endwith this.TESTCONTAINER = new CONTAINER(this) with (this.TESTCONTAINER) left = 114.0 top = 43.0 width = 885.0 height = 341.0 colorNormal = "0xfd563e" borderStyle = 4 // Single endwith this.TESTCONTAINER.VSCROLLBAR1 = new SCROLLBAR(this.TESTCONTAINER) with (this.TESTCONTAINER.VSCROLLBAR1) onChange = class::VSCROLLBAR1_ONCHANGE onLeftMouseDown = class::VSCROLLBAR1_ONLEFTMOUSEDOWN height = 340.0 left = 864.0 top = 0.0 width = 20.0 value = 0 colorNormal = "0x5eb91a" rangeMin = 0 rangeMax = 0 endwith this.TESTBUTTON = new PUSHBUTTON(this) with (this.TESTBUTTON) onClick = class::TESTBUTTON_ONCLICK height = 20.0 left = 344.0 top = 439.0 width = 104.0 text = "New" endwith this.TESTDELETEPB = new PUSHBUTTON(this) with (this.TESTDELETEPB) onClick = class::TESTDELETEPB_ONCLICK height = 20.0 left = 599.0 top = 439.0 width = 108.0 text = "Delete" endwith this.OBJCOUNT_SB = new SPINBOX(this) with (this.OBJCOUNT_SB) height = 22.0 left = 171.0 top = 439.0 width = 56.0 picture = "999 " function = "I" rangeMax = 100 rangeMin = 1 value = 0 spinOnly = true endwith this.OBJCOUNT_TL = new TEXTLABEL(this) with (this.OBJCOUNT_TL) height = 22.0 left = 59.0 top = 439.0 width = 91.0 text = "Object Count:" colorNormal = "Black/Gray" fontBold = true endwith this.OBJSEL_SB = new SPINBOX(this) with (this.OBJSEL_SB) height = 22.0 left = 171.0 top = 471.0 width = 56.0 picture = "999 " function = "I" rangeMax = 100 rangeMin = 1 value = 0 spinOnly = true endwith this.OBJSEL_TL = new TEXTLABEL(this) with (this.OBJSEL_TL) height = 22.0 left = 59.0 top = 471.0 width = 109.0 text = "Object Selected:" colorNormal = "Black/Gray" fontBold = true endwith endclass
-
Hello, @michael-belew, @lycan-thrope, @peterjones and All,
@lycan-thrope, I don’t really understand what you want to explain to the OP !
To my mind, in order to see the global behaviour of the
Smart Highlighting
feature, just use this simple text, below, that you’ll paste in a new tab :This is a test This is a Test This is a TEST This is a teST This was tested yerterday This was Tested yerterday This was TESTED yerterday This was teSTed yerterday This idea is detested This idea is Detested This idea is DETESTED This idea is deteSTed An another test to do An another Test to do An another TEST to do An another teST to do This was tested yesterday This was Tested yesterday This was TESTED yesterday This was teSTed yesterday This idea is detested This idea is Detested This idea is DETESTED This idea is deteSTed
Then :
-
Open the
Settings > Preferences... > Highlighting
section -
Enable the
Smart Highlighting
feature -
Double-click on the word
teST
of the fourth line of my text -
Now, check / uncheck the
Match case
and/(x)or theMatch whole word only
option(s)
Quite easy to understand, isn’t it !
Best Regards,
guy038
-
-
I don’t have any problem (using 8.7.1) with Smart Highlighting and your example:
-
@Alan-Kilborn said in Smart Highlight not working:
I don’t have any problem (using 8.7.1) with Smart Highlighting and your example:
Same for me, works as expected. Maybe a problem in relation with the UDL or a plugin?
Here is my Debug info:
Notepad++ v8.7.1 (64-bit) Build time : Oct 31 2024 - 00:48:56 Path : Command Line : Admin mode : OFF Local Conf mode : ON Cloud Config : OFF Periodic Backup : OFF OS Name : Windows 10 Enterprise (64-bit) OS Version : 22H2 OS Build : 19045.5131 Current ANSI codepage : 1252 Plugins : ComparePlus (1.2) DSpellCheck (1.5) HexEditor (0.9.12) mimeTools (3.1) NppConverter (4.6) NppExport (0.4)
-
perhaps your theme has set the background color of the smart highlighting to match the default background color?
-
@Ekopalypse ,
Bingo, we have a winner. I have no idea why that color was selected as the same background, or…it was by default and then when I changed my background color to what it is now, the conflict occurred. I never noticed it, but I’ve changed it to a cyan, and it does show up now.Thanks for that catch.
Thanks to all for their suggestions, and maybe the OP can now check his settings to solve his problem.
OP, might have the same problem. If you notice, the first
with
has different coloring than the others, I suspect the result of the current selection color choice being melded with the SmartHighlighting background color.