Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying from the context menu does not work with Copy Cat #2

Open
kanlukasz opened this issue Dec 13, 2021 · 7 comments · Fixed by #3
Open

Copying from the context menu does not work with Copy Cat #2

kanlukasz opened this issue Dec 13, 2021 · 7 comments · Fixed by #3
Assignees
Labels
bug Something isn't working

Comments

@kanlukasz
Copy link

Example:
9898

Environment info:

Version: 1.63.0
Commit: 7db1a2b88f7557e0a43fec75b6ba7e50b3e9f77e
Date: 2021-12-07T06:26:56.179Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Windows_NT x64 10.0.19044
@nkosakul nkosakul self-assigned this Dec 13, 2021
@nkosakul nkosakul added the bug Something isn't working label Dec 13, 2021
@nkosakul
Copy link
Owner

Hi!

Thanks for addressing this!
Unfortunately, VSCode API doesn´t let me hook on existing context menu items. So there is really nothing i can do.
And i´m not aware of some workarounds, yet.

But the API allows me to create my own context menu items, which i did as an alternative solution
screenshot

I hope this is an acceptable solution, until VSCode API gives us more options here.

It is now available with version 1.1.0

@nkosakul nkosakul linked a pull request Dec 14, 2021 that will close this issue
@kanlukasz
Copy link
Author

Hello

Are you sure there is no API for this?
I am asking because a similar extension (https://marketplace.visualstudio.com/items?itemName=EdgardMessias.clipboard-manager) works like this without a problem

PS. Sorry for the lack of PR, but my primary language is PHP

@nkosakul
Copy link
Owner

Im gonna have a look at it 👁️‍🗨️

@nkosakul
Copy link
Owner

As far as i can see, he is using setInterval as a workaround.
He´s listen to the clipboard (with vscode.env.clipboard.readText()) every 500ms.

That seems risky when it comes to performance. Not sure how the CPU likes that 🤔

@nkosakul
Copy link
Owner

Ah, i just look at his issues:
edgardmessias/vscode.clipboard-manager#233

high chance that the CPU Overload is coming from the setInterval

@kanlukasz
Copy link
Author

Thanks for checking. Yes, listening to the clipboard every 500 ms sounds risky.
On the other hand, I am now checking closed issues in the repository of that extension and I can see that apart from this one, there was no similar problem

PS. Your new option Copy and save... is nice but what about the cut option now? 😃

Maybe a good solution would be create some options:
(It's just an idea, I don't know how difficult it is to achieve this goal)
image

@nkosakul
Copy link
Owner

Great idea!
Im gonna try to implement it this afternoon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants