Checklist
Output of fzf --version
0.72.0 (HEAD-6fefe02) and 0.72.0 (e0d08190)
OS
Shell
Problem / Steps to reproduce
I have a question regarding the layout rendering, specifically when trying to seamlessly integrate fzf with a multi-line shell prompt using --layout=reverse.
I use a multi-line prompt in bash. When I press Ctrl+R, I want the fzf prompt to perfectly replace my second prompt line, keeping the visual connection with the first line intact.
Current Behavior
If I use --layout=reverse combined with --preview-window=up, the preview window is placed at the absolute top of the fzf canvas. This pushes the --prompt down, visually splitting my original shell prompt and the fzf prompt.
steps
unset PROMPT_COMMAND; export PS1=$'\nline1\nline2$ '
export FZF_DEFAULT_OPTS=''
export FZF_CTRL_R_OPTS="--layout=reverse --preview 'echo {}' --preview-window up:3:hidden --bind 'ctrl-\:toggle-preview' --prompt='line2$ '"
when I try preview the history, it shows
line1 <-- Bash prompt line 1
╭─ Preview ──────╮ <-- Preview window cuts in!
│ preview text │
╰────────────────╯
line2$ > <-- fzf prompt is pushed down here
command 1
command 2
expectation
line1 <-- Bash prompt line 1
line2$ > <-- fzf prompt perfectly aligned!
╭─ Preview ──────╮
│ preview text │
╰────────────────╯
command 1
command 2
screenshots

Checklist
man fzf)Output of
fzf --version0.72.0 (HEAD-6fefe02)and0.72.0 (e0d08190)OS
Shell
Problem / Steps to reproduce
I have a question regarding the layout rendering, specifically when trying to seamlessly integrate
fzfwith a multi-line shell prompt using--layout=reverse.I use a multi-line prompt in bash. When I press
Ctrl+R, I want thefzfprompt to perfectly replace my second prompt line, keeping the visual connection with the first line intact.Current Behavior
If I use
--layout=reversecombined with--preview-window=up, the preview window is placed at the absolute top of the fzf canvas. This pushes the--promptdown, visually splitting my original shell prompt and the fzf prompt.steps
when I try preview the history, it shows
expectation
screenshots