code-clip-ring
code-clip-ring copied to clipboard
Ring Items are not selected after paste
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.
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.
Thanks for reporting. I can reproduce the error. I'll have a look in the next few days.
Hi, I am also seeing this issue. Have you been able to fix this yet? Thanks, Giles
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.