junegunn / vim-peekaboo

:eyes: " / @ / CTRL-R
1.12k stars 38 forks source link

Don't run winrestcmd to restore windows #89

Open gibfahn opened 2 weeks ago

gibfahn commented 2 weeks ago

Commits (oldest to newest)

3490bc6 Don't run winrestcmd to restore windows

If you look at :h winrestcmd it says:

winrestcmd()                                                      *winrestcmd()*
  Returns a sequence of |:resize| commands that should restore
  the current window sizes.  Only works properly when no windows
  are opened or closed and the current window and tab page is
  unchanged.
  Example: >vim
    let cmd = winrestcmd()
    call MessWithWindowSizes()
    exe cmd

We can't guarantee this, so don't try to restore windows.

Refs: https://github.com/neoclide/coc.nvim/issues/4178#issuecomment-1243592457 Refs: https://github.com/vim-ctrlspace/vim-ctrlspace/pull/306 Fixes: https://github.com/junegunn/vim-peekaboo/issues/74 Fixes: https://github.com/junegunn/vim-peekaboo/issues/83