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

Clipboard read on visual select #51

Open
ayroblu opened this issue Jan 23, 2023 · 5 comments
Open

Clipboard read on visual select #51

ayroblu opened this issue Jan 23, 2023 · 5 comments

Comments

@ayroblu
Copy link

ayroblu commented Jan 23, 2023

Describe the bug

When I visual select some code, I notice that it's triggering the onWriteClipboard

Steps To Reproduce

  1. Visual select some text
  2. See your clipboard (or use the debug)

Expected behavior

No clipboard when visual selecting

Actual behavior

Clipboard when visual selecting

Your environment

  • OS: macOS
  • Browser: chrome
  • Browser Version: 109

Additional context (if any)

@rhysd
Copy link
Owner

rhysd commented Jan 23, 2023

The clipboard support is optional. The example writes selected text to clipboard because of this line.

vim.onWriteClipboard = navigator.clipboard.writeText;

However if you're using vim.wasm in your project, you can just remove the line then selected text won't be written to clipboard.

@ayroblu
Copy link
Author

ayroblu commented Jan 23, 2023

I want to have the clipboard, I just don't want it to write to it everytime I visually select a line

@rhysd
Copy link
Owner

rhysd commented Jan 24, 2023

Isn't your 'clipboard' option set to autoselect?

@ayroblu
Copy link
Author

ayroblu commented Jan 24, 2023

FYI, this is the behaviour observed on https://rhysd.github.io/vim.wasm/
It says clipboard= for set clipboard?

@rhysd
Copy link
Owner

rhysd commented Jan 30, 2023

OK, thanks. I could confirm it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants