Closed ipwnponies closed 5 years ago
Looks like you have --border
in your FZF_DEFAULTS_OPTS. That has not been not correctly handled by Vim wrapper, so the problem is also reproducible on Vim if we force it to use a terminal buffer by using layout option other than down
.
:let $FZF_DEFAULT_OPTS = ''
:call fzf#run({'source': range(2), 'up': '~40%', 'options': '--no-border --no-inline-info'})
:call fzf#run({'source': range(2), 'up': '~40%', 'options': '--inline-info'})
:call fzf#run({'source': range(2), 'up': '~40%', 'options': '--border'})
:call fzf#run({'source': range(2), 'up': '~40%', 'options': '--inline-info --border --header foo'})
" Not sure why this one doesn't work as expected
:call fzf#run({'source': range(2), 'up': '~40%', 'options': '--inline-info --border'})
Anyway, the above patch (in devel branch, soon to be merged to master) should help.
Oh nice, I forgot to mention the env var:
FZF_DEFAULTS_OPTS = --reverse --select-1 --exit-0 --border --height 40% --min-height 10 --margin 1,5 --inline-info --bind pgdn:preview-page-down,pgup:preview-page-up,change:top,ctrl-s:toggle-sort
I've tested your repro and and can confirm it only occurs when both --inline-info
and --border
are set.
Summary
When calling
fzf#run
with 2 results, the fzf window is not sufficiently tall to display any results.Repro
Setup
minimal_vimrc:
Command:
I don't know what 'down' option does, it's provided by default from
fzf#wrap
. https://github.com/junegunn/fzf/blob/315e568de006e80138f79c77d5508c7e4853e6b2/plugin/fzf.vim#L302-L308 It's how LanguageClient-neovim is using it, for additional context on use case.Results
minimal_vimrc
Works for vim8 (8.0.1453) Broken in nvim (v0.3.1)
Using actual vimrc
I think this may provide clues. It looks like a padding issue, need more to account for neovim terminal mode? vim neovim