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

textmarker.highlightColors set to a single color option still uses two colors. #13

Closed BouncingBison closed 6 years ago

BouncingBison commented 6 years ago

When I specify this setting to use only one color (such as dark blue) the highlighter will be dark blue on the first item i highlight within a file. however when i highlight a second item instead of the dark blue that i have in my settings, i instead get a light gray highlight on all other items i choose in the file. If i remove all highlights within the file and begin highlighting again the problem will repeat itself. Ive included some screen shots to show the color selections in settings and in action within the files.

screen shot 2018-04-07 at 2 38 44 pm screen shot 2018-04-07 at 2 29 41 pm screen shot 2018-04-07 at 2 31 27 pm
ryu1kn commented 6 years ago

Hi @BouncingBison , thanks for your comment with the clear description and screenshot. Screenshot always help me understand things quicker!

As for the behaviour you observed, it is actually meant to be that way, and there is a test case confirming it. Once it used all highlightColors, it starts using DEFAULT_COLOUR (i.e. gray) for all the subsequent highlights, as it doesn't know what colours to use otherwise.

What we can do to avoid this confusion could be to mention this thing on the textmarker.highlightColors's description. What do you think?

BouncingBison commented 6 years ago

I think that would be a great solution and gives people a great starting point!

ryu1kn commented 6 years ago

Cool @BouncingBison . Let me update the description then I'll close this ticket.

ryu1kn commented 6 years ago

Added the note, thank you! 👍