junegunn / vim-peekaboo

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

Don't trigger autocmds when switching back #29

Closed mhinz closed 9 years ago

mhinz commented 9 years ago

The peekabook window should be as unintrusive as possible. The buffer in the source window shouldn't be changed in the first place, therefore there is no need to retrigger any autocmds when switching back to it.


Hi,

I noticed this glitch because whenever I enter a help buffer, either wincmd L (if there's only window) or wincmd T (all other cases) gets triggered.

Thus :h :h creates a vertical split and the time I press ", peekaboo#peek() runs s:back(), where execute s:win.current.'wincmd w' goes back to the source window which triggers wincmd T, which creates a new tab, which is not what I expect.

junegunn commented 9 years ago

:+1: