You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe its a fish bug and not an fzf bug due to other similar open issues like #5860 and that it only happens if you insert something into the commandline, repaint works normally without insertion.
The text was updated successfully, but these errors were encountered:
function fzf-bind-5
fzf --height 40%
commandline -t 1
end
bind \eg fzf-bind-5
Shows what happens without commandline -f repaint.
So the issue is reproducible by running just fzf followed by an commandline insertion.
nhooyr
changed the title
commandline bugs out when editing with a multiline prompt with fzf
Prompt redraw bugs out when editing with a multiline prompt with fzf
Nov 22, 2019
It's still broken for me on fish 3.3.1. Every step (a to g) reproduces exactly as described by @nhooyr. Adding printf '\033[J' to the start of fish_prompt makes no difference for me. In that comment they say fish is drawing the prompt in the right place, but neglecting to clear the screen below. For me, it seems more that fish is just drawing the prompt in the wrong place, one line lower than it should.
I've found a different workaround, though. I just move the cursor up after invoking fzf:
function fzf-bind-1
set result (fzf --height 40%)
printf"\033[A"commandline-t 1
commandline-f repaint
endbind\ea fzf-bind-1
I'm also capturing the output of fzf to avoid printing it to the screen, allowing me to test that this works properly when you make a selection (i.e. press Enter instead of Escape).
Minimal config.fish:
/tmp/home/.config/fish/config.fish
FIRST
line of the prompt twice.The second bind will show what happens when nothing is inserted, no additional
FIRST
line appears. The prompt looks normal.The third bind shows what happens when fzf isn't ran but 1 is inserted, no additional
FIRST
line appears.SECOND
line of the prompt is missing.Related: junegunn/fzf#1607
I believe its a fish bug and not an fzf bug due to other similar open issues like #5860 and that it only happens if you insert something into the commandline, repaint works normally without insertion.
The text was updated successfully, but these errors were encountered: