which-key.nvim icon indicating copy to clipboard operation
which-key.nvim copied to clipboard

`quote0` register not being populated

Open aleprovencio opened this issue 2 years ago • 7 comments

AKA yank register, the register that records the most recent yank command, is not working with which-key default options.

The issue is on the operator preset, and I'm disabling it as a temporary fix, as in:

require'which-key'.setup {plugins = {presets = {operators = false}}}

I've seen #36, maybe there's something related.

aleprovencio avatar Nov 22 '21 19:11 aleprovencio

I have the same issue with register zero not being populated, but even disabling the operator presets doesn't fix it.

cpakkala avatar Jan 01 '22 18:01 cpakkala

Did some digging on this locally and it seems like the issue is that when set clipboard=unnamed or set clipboard=unnamedplus is active M.reg evaluates to * or + respectively here: https://github.com/folke/which-key.nvim/blob/312c386ee0eafc925c27869d2be9c11ebdb807eb/lua/which-key/view.lua#L232-L241

I also noticed that without the clipboard setting (or set clipboard=) M.reg will evaluate to ". I found that resetting the variable back to " resolved the issue of the quote0 register not being set without affecting the system clipboard integration.

I just opened a PR which implements a potential fix, please let me know what you think: https://github.com/folke/which-key.nvim/pull/233

JoshNavi avatar Jan 08 '22 01:01 JoshNavi

LGTM @JoshNavi, way to go! :smile:

aleprovencio avatar Jan 08 '22 21:01 aleprovencio

I'm seeing this issue too. Anything preventing the fix from being merged?

bdwiel avatar Feb 21 '22 14:02 bdwiel

+1 ; facing this issue too; @folke , can we merge this fix pls?

karangb avatar May 28 '22 17:05 karangb

any update on this?

MJB47 avatar Jul 23 '22 14:07 MJB47

I ran into the same issue when using whichkey with osc52. It'd be great if this fix can be merged. I applied it in my fork for now. Thanks for a great plugin!

desilinguist avatar Aug 03 '22 13:08 desilinguist