vscode-text-marker icon indicating copy to clipboard operation
vscode-text-marker copied to clipboard

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

Open suzetmk opened this issue 6 years ago • 9 comments

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.

suzetmk avatar Feb 27 '19 05:02 suzetmk

@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?

ryu1kn avatar Feb 27 '19 05:02 ryu1kn

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

peek 2019-02-27 14-49

suzetmk avatar Feb 27 '19 05:02 suzetmk

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 avatar Feb 27 '19 06:02 ryu1kn

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 avatar Feb 27 '19 06:02 ryu1kn

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

ryu1kn avatar Feb 27 '19 06:02 ryu1kn

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 avatar Feb 27 '19 06:02 suzetmk

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

peek 2019-02-27 15-48

suzetmk avatar Feb 27 '19 06:02 suzetmk

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.

ryu1kn avatar Feb 27 '19 22:02 ryu1kn

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

suzetmk avatar Mar 01 '19 00:03 suzetmk