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

Go to Next/Previous highlight sould update color focus every time #31

Open suzetmk opened 5 years ago

suzetmk commented 5 years ago

Many thanks to your cool extension. When I invoke first "Go to Next/Previous highlight" command, the word hit get selected. But when I repeat it, the selection remains there (never follow the word hit). I feel this makes current cursor position unrecognizable.

ryu1kn commented 5 years ago

@suzetmk Thanks for your encouraging comment.

The behaviour you described sounds like a bug but I cannot reproduce it. Can you provide me the exact detailed steps to reproduce it?

suzetmk commented 5 years ago

It behaves like this. Can't it be reproduced?

peek 2019-02-27 14-49

ryu1kn commented 5 years ago

Thanks @suzetmk for the animation! I can see the cursor is jumping to the next/previous editor and (it's not clear but) the selection is also changing. Is your problem that the colour is not moving with the cursor position?

ryu1kn commented 5 years ago

Looks like the all editor's (except one) colour is provided by the Code which you get when you select the exact same text.

ryu1kn commented 5 years ago

But I wonder why only the first jumped text colour remains unchanged 🤔

suzetmk commented 5 years ago

Thank you for your quick responses.

Is your problem that the colour is not moving with the cursor position?

Yes, exactly.

(it's not clear but) the selection is also changing.

Ah yes. You're right. I've misunderstood that the color is not changing because of selection remaining, But actually the selection is correctly moving with each jump.

Looks like the all editor's (except one) colour is provided by the Code which you get when you select the exact same text.

Yes. They are highlighted by my custom setting of "editor.selectionHighlightBackground": "#414124" and "editor.selectionHighlightBorder": "#999999". But the behavior doesn't change even when those settings are disabled.

suzetmk commented 5 years ago

When I change the selection manually over Text-Marker-ed words, the color changes as I expected.

peek 2019-02-27 15-48

ryu1kn commented 5 years ago

Cool, thanks for the updates. It seems the current focused text actually have a sightly different colour from others, but the first jumped text never gets editor.selectionHighlightBackground applied.

suzetmk commented 5 years ago

Thank you. If you need further information, please feel free to ask me.