nvim-miniyank icon indicating copy to clipboard operation
nvim-miniyank copied to clipboard

Wrong message when trying to paste from an empty register

Open kurkale6ka opened this issue 9 years ago • 1 comments

After having a look at my registers with :reg, I tried to paste ("*p) from * which was empty and got this overly verbose (and wrong) message:

Error detected while processing function miniyank#do_putnext[5]..miniyank#putreg:
line    3:
E353: Nothing in register 0

kurkale6ka avatar Dec 21 '16 09:12 kurkale6ka

Three lines is not overly verbose, that is how vim prints an error with context.

One could add a manual check that simulates the error message with the correct register name in some cases, but doing it right for "/+/* in all cases is not possible, as v:register will tell the "adjusted" name (for cb=unnamed[plus]) and not the actual register the user requested. Not sure the complexity will be worth this cosmetic issue.

bfredl avatar Dec 21 '16 19:12 bfredl