-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
Using v6.9 on Windows 10 64bit
When selecting a piece of text with smart highlighting on (identical word or variable is highlighted throughout the document), collapsing a large block of code so that a new instance of that text is visible without needing to scroll the window does not trigger Smart Highlighting for that new instance.
If the window is scrolled so that the new instance comes into view, then that instance will be highlighted again, and will remain highlighted until a new selection is made.
I'm encountering this in Python and HTML files, have not tested others. I'd have to assume it's universal.
Reproduction:
Write the following in a new text file using HTML language settings:
hello
hello
<body>
[make about 100 blank lines here]
</body>
hello
Then, select one of the "hello" strings at the top. You will see the second "hello" is highlighted due to Smart Highlighting.
Now, collapse the "body" tag so that the third "hello" enters view without scrolling the window. Smart Highlighting will not highlight this new instance.
Without removing the selection, expand and collapse the "body" tag block multiple times, noting that Smart Highlighting does not pick up the word.
Finally, expand the "body" tag then scroll the window so the third "hello" comes into view. Smart Highlighting will pick it up, and it will remain highlighted as you continue to expand and collapse the "body" tag correction: it may not remain highlighted: the issue is repeated in this case, so the third instance is still not highlighted.