-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
bugSomething that's not working as intendedSomething that's not working as intended
Milestone
Description
In tmux with $ tmux set focus-events on fish will put "garbage" in the command line when it receives/loses focus after closing/creating a split window.
Bisect:
7c153a8307c662fa853280fd64657dff0cd9a625 is the first bad commit
commit 7c153a8307c662fa853280fd64657dff0cd9a625
Author: ridiculousfish <rf@fishshell.com>
Date: Sat Apr 10 20:41:33 2021 -0700
Introduce prepare_to_select, fixing job_summary.py
This concerns printing status messages for background jobs which have
stopped or finished. Previously fish would do this from two places:
1. Before running a command (including empty string)
2. If a signal is received during select()
So if the job finishes while fish is doing something else (like running an
event handler) then we would not print status messages until the user hit
return. This caused the job_summary.py test to be flaky.
Fix this by splitting the interrupt handler into two parts: a part that
handles signals (e.g. triggering exit from the reader), and a part that
always runs just before blocking in select(). This second part always
reaps jobs and prints their status messages. This narrows the window for a
job exit to be "missed" before fish blocks in select, and should make the
job_summary.py test more reliable.
src/input.cpp | 13 +++++++++----
src/input.h | 3 +++
src/input_common.cpp | 7 +++++++
src/input_common.h | 4 ++++
4 files changed, 23 insertions(+), 4 deletions(-)
Tested on both Arch Linux and NixOS unstable.
Recording of observed behaviour in the linux tty on a clean nixos vm: https://asciinema.org/a/ODR7cnvio1vcaaZIdvFfe3oiJ
See #8628 (comment) for steps to reproduce.
Metadata
Metadata
Assignees
Labels
bugSomething that's not working as intendedSomething that's not working as intended