mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 05:43:11 +00:00
32ed0b80da
As explained in the parent commit, if we print things to the command line, we move the cursor down before redrawing a multi-line prompt. This is a workaround to avoid erasing what we printed. We forgot to do add this workaround to fish_job_summary. When running `sleep 1 &` with a multiline prompt, the job exit notification is immediately overwritten (most of the time). This can be observed consistently on Linux by waiting before redrawing: diff --git a/share/functions/fish_job_summary.fish b/share/functions/fish_job_summary.fish index a552fabbc..f457ee8e8 100644 --- a/share/functions/fish_job_summary.fish +++ b/share/functions/fish_job_summary.fish @@ -52,6 +52,7 @@ function fish_job_summary -a job_id is_foreground cmd_line signal_or_end_name si string repeat \n --count=(math (count (fish_prompt)) - 1) >&2 if test $is_foreground -eq 0; and test $signal_or_end_name != STOPPED + sleep 1 commandline -f repaint end end Move the cursor down to work around this. In future, we could avoid calling fish_prompt. Also, this solution add an extra blank lines before the next prompt. With a real fix, we could get rid of that. Even worse, sometimes there are two blank lines instead of one (for a two-line prompt). Fixes #8817 |
||
---|---|---|
.. | ||
completions | ||
functions | ||
groff | ||
tools | ||
__fish_build_paths.fish.in | ||
config.fish | ||
lynx.lss |