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

Use unnamed register while clipboard not exist #13813

Merged
merged 3 commits into from
Mar 3, 2024
Merged

Conversation

znsoooo
Copy link
Contributor

@znsoooo znsoooo commented Jan 3, 2024

It only takes effect when the system clipboard is not available.

From issue: #13809

runtime/mswin.vim Outdated Show resolved Hide resolved
@chrisbra
Copy link
Member

can you please make the following changes?

  • Change it to has("clipboard_working")
  • don't map using the default register.

@chrisbra chrisbra added the needs more work used for a pull request that isn't ready to include (other than needing a test) label Jan 23, 2024
@znsoooo
Copy link
Contributor Author

znsoooo commented Feb 2, 2024

@chrisbra Sorry, I forgot to check the messages recently.


Change it to has("clipboard_working")

But why is "clipboard_working"?

I looked at "feature-list", but only saw "clicpboard", and there is no "clipboard_working":

image

And as I mentioned before, "some system clipboard is available", on these computers there did has the "clicpboard" register but no "clipboard_working" register. If I do change, it will cause the computers that "mswin.vim" can be effacted do not work anymore.


don't map using the default register.

What register do you recommend I use?

And my consideration for using the default registers is that if you copy text from another command (e.g. yy), you can also paste the copied text with ctrl-v.

@chrisbra
Copy link
Member

chrisbra commented Feb 6, 2024

But why is "clipboard_working"?

It is here:

clipboard_working Compiled with 'clipboard' support and it can be used.

you want to make sure the clipboard actually works (this matters when using vim over a remote connection).

What register do you recommend I use?

And my consideration for using the default registers is that if you copy text from another command (e.g. yy), you can also paste the copied text with ctrl-v.

Why use a register at all? If you don't specify a register it goes to the default one, right? And if you want to use a different register, you can simply use "b<ctrl-x> and it would end up in register b.

@znsoooo
Copy link
Contributor Author

znsoooo commented Feb 14, 2024

@chrisbra
I got it, I will make the change. I'm on vacation now and my computer is not with me. I'll change it later.

runtime/mswin.vim Show resolved Hide resolved
runtime/mswin.vim Outdated Show resolved Hide resolved
runtime/mswin.vim Outdated Show resolved Hide resolved
@chrisbra chrisbra merged commit d9ebd46 into vim:master Mar 3, 2024
32 checks passed
clason added a commit to clason/neovim that referenced this pull request Mar 4, 2024
runtime(mswin): Use unnamed register when clipboard not working (vim/vim#13813)

* Use unnamed register while clipboard not exist
* Do not need to specify the unnamed register explicitly
fixes: vim/vim#13809

vim/vim@d9ebd46

Co-authored-by: Shixian Li <34830785+znsoooo@users.noreply.github.com>
clason added a commit to neovim/neovim that referenced this pull request Mar 4, 2024
runtime(mswin): Use unnamed register when clipboard not working (vim/vim#13813)

* Use unnamed register while clipboard not exist
* Do not need to specify the unnamed register explicitly
fixes: vim/vim#13809

vim/vim@d9ebd46

Co-authored-by: Shixian Li <34830785+znsoooo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more work used for a pull request that isn't ready to include (other than needing a test) runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants