ibhagwan / fzf-lua

Improved fzf.vim written in lua
MIT License
2.37k stars 151 forks source link

Bug: when using `split`, vim resize while fzf is open causes wrong `cmdheight` on close #1462

Closed jfly closed 1 month ago

jfly commented 1 month ago

RTFM Checklist

Operating system

Linux

Shell

fish

Neovim version (nvim --version)

v0.11.0-nightly+69553f7

Fzf version (fzf --version)

0.55.0

Output of :lua print(os.getenv('FZF_DEFAULT_OPTS'))

nil

Is the problem reproducible with mini.sh?

Fzf-lua configuration

require('fzf-lua').setup({
    winopts = {
      split = "belowright new",
      height = 0.4,
      preview.hidden = "hidden",
    };
})

Describe the bug / steps to reproduce

Open fzf-lua, resize neovim, and then close fzf lua. You'll be left with an empty space at the bottom that I cannot figure out how to make go away (other than restarting neovim). :FzfLua redraw doesn't fix things.

This is easiest to just see in a video, here you go:

https://github.com/user-attachments/assets/18046175-d045-4c40-b669-bd402c0590b0

ibhagwan commented 1 month ago

Seems like a cmd height, while bugged can you try :set cmdheight=1 and let me know if this fixes the layout?

If so, should be an easy fix.

jfly commented 1 month ago

That's it! Before bug: cmdheight=1. After bug: cmdheight=12. :set cmdheight=1 fixes it.

ibhagwan commented 1 month ago

That's it! Before bug: cmdheight=1. After bug: cmdheight=12. :set cmdheight=1 fixes it.

Thanks for the video which made this clear and for confirming @jfly, I’ll fix it shortly.

ibhagwan commented 1 month ago

https://github.com/ibhagwan/fzf-lua/commit/d76cc35a2945beb4d916050a8ad34b7daf1b4054

@jfly, should work as expected now.

jfly commented 1 month ago

That works great! Thank for for the quick response and quick fix =)