maxbrunsfeld / vim-yankstack

A lightweight implementation of emacs's kill-ring for vim
437 stars 29 forks source link

There's one extra item in stack always #35

Closed kra3 closed 11 years ago

kra3 commented 11 years ago

I noticed that there's an extra item in my yank stack always.

So, I just started a new vim (on another terminal) and run :Yanks and there's an item already in the stack even though I haven't done anything in this vim session yet. It seems to me that it's my last yank from my last vim session.

:set clipboard returns this clipboard=autoselect,exclude:cons\|linux I'm using Vim 7.4b

maxbrunsfeld commented 11 years ago

Yes, this is the desired behavior. The top of the yank stack is defined to be the contents of your default paste register.

kra3 commented 11 years ago

For my understanding: So you are saying that, if I start vim tomorrow, it will show me yesterday's last yank in the stack, eventough I haven't yanked anything yet?

maxbrunsfeld commented 11 years ago

Think about it this way: if you didn't have yankstack installed, and you started up vim and hit 'p', you would paste whatever was in your paste buffer last time you opened vim. Of course, it wouldn't make sense for yankstack to alter this behavior; the goal is to augment vim's normal paste buffer.

kra3 commented 11 years ago

Sure. If it's default behavior of vim, let it be.

I didn't know vim has such a bug :bug: (or feature :tongue: , if you insist )