code-clip-ring icon indicating copy to clipboard operation
code-clip-ring copied to clipboard

Ring Items are not selected after paste

Open lemomar opened this issue 1 year ago • 4 comments

Hi there,

I've been using your extension with the default settings, and I'm encountering an issue where pasting ring items with Cmd+Shift+V works, but it does not select them. So instead of cycling through ring items, it just pastes them in a chain.

At first I thought it was due to my user settings, but the problem remains even after removing them all. Is this a common issue?

And lastly, thanks for the amazing extension.

lemomar avatar Mar 30 '23 01:03 lemomar

More info: Tried this on a fresh installation of VsCode, and I can reproduce the issue.

It also applies to the Select and Paste Ring Item command, even with clipring.selectTextAfterPasteFromMenu set to true.

lemomar avatar Mar 30 '23 01:03 lemomar

Thanks for reporting. I can reproduce the error. I'll have a look in the next few days.

SrTobi avatar Mar 31 '23 14:03 SrTobi

Hi, I am also seeing this issue. Have you been able to fix this yet? Thanks, Giles

gillez avatar May 12 '23 15:05 gillez

Hmm seems that there was a change in how the vscode api handles empty selections when replacing text

https://github.com/SrTobi/code-clip-ring/blob/6e28e9354742bd554780c93a7ded79f08a0cf267/src/ring_commands.ts#L83

It works when some text is selected. I have created an issue in vscode, but I guess I'll come up with a workaround until it is fixed.

SrTobi avatar May 14 '23 15:05 SrTobi