ryu1kn / vscode-text-marker

Visual Studio Code Extension. Select text in your code and mark all matches. The marking colour is configurable
https://marketplace.visualstudio.com/items?itemName=ryu1kn.text-marker
MIT License
87 stars 17 forks source link

It has a hard time unhighlighting. #25

Closed smchughinfo closed 5 years ago

smchughinfo commented 5 years ago

It's very useful except I can't unhighlight things sometimes. I right click over the highlighted text and use Toggle Highlight but nothing happens. Even after pasting the text into notepad and back into VS Code it still remembers that the text was highlighted. It makes the tool difficult to use because unless highlighting/unhighlighting is done perfectly it really only works in one direction.

ryu1kn commented 5 years ago

Hi @smchughinfo , can you let me know the exact steps to reproduce the behaviour including how you selected the text you wanted to unhighlight? A screen recording would be really helpful if it's easier for you. Thanks!

smchughinfo commented 5 years ago

Here's a screen recording https://youtu.be/0sqDzU04m9o

If I'm careful I can back out the highlights one by one but one false step and I get lost. As for it not saving a custom highlight color I don't have a way to screen record that. But basically just highlight as normal, with a custom color, and close and reopen vs code and there isn't any visible highlighting.

ryu1kn commented 5 years ago

Hi @smchughinfo , sorry for my slow response. The video was super helpful for me to understand the behaviour, thank you!

Actually, it’s the expected behaviour. When you unhighlight, normally you just put a cursor somewhere on the highlight without selecting any text. Or you can select the exact pattern (which is impossible for regex pattern) to unhighlight it, which is useful when the pattern you want to unhighlight is a substring of longer pattern.

ryu1kn commented 5 years ago

Hi @smchughinfo , hope the above comment helped you see how it's expected to work. I'm closing this now.