junegunn / vim-peekaboo

:eyes: " / @ / CTRL-R
1.13k stars 39 forks source link

Register 0 is shown wrong #17

Closed gelguy closed 9 years ago

gelguy commented 9 years ago

Register 0 is shown wrong in the peekaboo window.

https://github.com/junegunn/vim-peekaboo/blob/master/autoload/peekaboo.vim#L32

This is caused by Vim's string equality, 0 == '%' is true. So for register 0, register '%' is printed instead. This can be fixed by checking that the register is a Number or using a regex.

junegunn commented 9 years ago

Whoa, it was a nasty bug. Fixed it. Thanks for the report!