junegunn / vim-peekaboo

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

cmd height changed to maximum #74

Open jackielii opened 3 years ago

jackielii commented 3 years ago

I can't figure out which plugin caused the issue, with minimum config it's ok, but with plugins enabled it shows the error.

I think the plugins related are peekaboo, vim-surround, vim-airline.

steps to reproduce:

  1. record a micro like so: qqf=ysiw"j0q qq record macro q f= move to = ysiw" add around a word " j0q move to next line and to the beginning and end macro
  2. keep applying @q
  3. when there is a blank line, the error shows

screenshot before pressing @q: image

screenshot after bug image

at this point I had to resize the windows vertically to get it back,

set verbosefile=filename.txt set verbose=9

relevant part of the log:

Executing BufEnter Autocommands for "*"
autocommand if g:repeat_tick == 0|let g:repeat_tick = b:changedtick|endif

Error detected while processing function peekaboo#aboo[76]..<SNR>140_close:
line    1:
E939: Positive count required: bd 0
airline: group: airline_error already done, skipping
airline: group: airline_error_bold already done, skipping
airline: group: airline_error_red already done, skipping
airline: group: airline_c1_to_airline_x already done, skipping
airline: group: airline_c1_to_airline_x_bold already done, skipping
junegunn commented 3 years ago

I can't reproduce the problem with my setup. Can you provide a minimal set of plugins and settings that can be used to reproduce the problem?

gibfahn commented 1 year ago

Seeing what I think is the same issue, filed it over at https://github.com/neoclide/coc.nvim/issues/4178

Gee19 commented 1 year ago

Closing floats before calling winrestcmd seems to fix this

https://github.com/Gee19/vim-peekaboo/commit/4882bb445d0065bb5bdb1003d1d86a462987d80e

crispyrooster commented 1 year ago

anyone know how to close the lspconfig hover buf? having same issue with it causing peekaboo resizing cmdheight.

edit : I commented out the following line (from /autoload/peekaboo.vim ) and now regardless of hover buf state, when I enter peekaboo from normal mode with " or @, or insert mode with ctrl-r, the peekaboo window closes without issue and all panes are the correct size.

anyone aware of a case that fails?

execute s:winrestcmd

gibfahn commented 2 weeks ago

Filed https://github.com/junegunn/vim-peekaboo/pull/89 to see if disabling winrestcmd fixes the issue.