Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spurious markers near the vertical scroll bars for smart highlighting #123

Closed
mahaju opened this issue Aug 16, 2023 · 7 comments
Closed

Comments

@mahaju
Copy link

mahaju commented Aug 16, 2023

Describe the bug
When opening a large document vertical scrollbars show locations of highlighted words, even though I have not highlighted anything yet

To Reproduce

  1. Open a large document
  2. Do not highlight anything, just use the vertical scrollbar to scroll through the document
  3. Position of highlighted words start appearing next to the vertical scroll bars, even though I have not highlighted anything
  4. Once I highlight a word, positions of the highlighted words start appearing along side the spurious markers previously explained; unhighlighting the word makes its markers disappear, but the spurious markers remain

This happens randomly for me and I don't have an exact way to reproduce this, but whenever it does happen the steps mentioned above will produce it. I also usually have a large number of tabs open, although I am not sure if this is relevant.

Expected behavior
The markers next to the vertical scrollbar should only appear when I highlight words, and should disappear when I unhighlight them.

Screenshots
This is when I just open this large document.
image

I do not highlight any word, but just scroll down clicking and dragging the scroll bar
image

I highlight a frequently occurring word
image

I unhighlight the frequently occuring word
image

Is this a bug or is there a setting I need to change? I only use the jN plugin for the smart highlighting feature so I don't know any details about the plugin settings. I have kept everything at their default.

Environment

  • OS: Windows 10 Pro 22H2 build 19045.3324
  • OS Arch: x64
  • Notepad++ Version v8.2.1 (64-bit)
  • Notepad+ Arch: x64
  • jN Version : 2.2.185.6

image

image

@sieukrem
Copy link
Owner

It seems to be a bug. Can you please check with latest release

@mahaju
Copy link
Author

mahaju commented Aug 18, 2023

I updated with the latest release [renamed the old jN folder to jN.2.2.185.6, copied everything in jN_2.2.185.9_x64.zip to a new jN folder inside "C:\Program Files\Notepad++\plugins"]

The problem is still happening
The markers seem to be thicker this time
Again, this happens randomly and it's happening (sometimes) in some files and not happening in others
For example, here is a .kt file with no word highlighted:
image
I have another .kt file open that behaves normally. I don't know what is the difference between the two .kt files.

I will revert back to the older jN version for now, because I prefer the thinner markers. Let me know if you would like me to test something else.

Could this be related to file extension or file size?

@mahaju
Copy link
Author

mahaju commented Aug 18, 2023

I was looking at the "smart highlighter" settings
image
and I noticed that if I uncheck all the boxes, all smart highlighting markers go away, both legitimate and spurious. Could changing anything here get rid of the spurious markers? Do you have any documents that explain what the 32 options are?

Seems this is something related to the "SmartHighlighter.js" file in C:\Program Files\Notepad++\plugins\jN\jN\includes, but I don't know any javascript. Some document explaining what the 32 options are (all I could figure out is it seems to be some kind of bit mask) would be helpful, if these settings are relevant to getting rid of the spurious markers.

@naaitsab
Copy link

naaitsab commented Oct 1, 2023

Looks to be related to specific document content. Tested some random files in the same session.
Works fine: log, xml, txt, js, psc and new unsaved file (new 1)
Issue: toml
When I copy the text content from the toml file to one of the files that works as normal it shows the exact same issue as the toml file and what the OP references to. When I delete the text again on all open documents that have it in, it reverts to normal. If I leave the text in one of the documents it shows the black bars at random when selecting the file in the tab of N++

The toml file content for reference: Link as the content gets mangled

@sieukrem
Copy link
Owner

sieukrem commented Oct 9, 2023

I could reproduce the issue!

  1. URLs in documents are using indicator 9 and are black, these are spurious markers, which appear als when nothing is selected. Just unselect the indicator 9 in Smart Highlighter Settings
  2. There is a bug in jN which was uncovered through behavior change somewhen after N++ version v7.xx. Switching from huge documents to smaller lead to left overs in the indicator panel. I will push a fix soon.

@sieukrem
Copy link
Owner

sieukrem commented Oct 9, 2023

Please check the latest release!

@mahaju
Copy link
Author

mahaju commented Oct 10, 2023

@sieukrem Here are some of my findings:

  1. URLs are indeed causing the spurious markers. Unselecting indicator 9 removes them.
  2. Using latest release, I get the same effect I mentioned previously at Spurious markers near the vertical scroll bars for smart highlighting #123 (comment)
    that is, spurious markers still appear, but all markers are now thicker

Since I prefer thinner markers, for now the best solution for me is to just uncheck indicator 9

Would you mind sharing any documents explaining what the different indicators are and what they do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants