terminal: Fix terminal not closing after non-zero shell exit (#52520)

Closes https://github.com/zed-industries/zed/issues/38901

Supersedes https://github.com/zed-industries/zed/pull/39082

This PR fixes an issue where the terminal tab would stay open after the
user exits a shell that has a non-zero exit code (e.g. running `false`
then `exit`, or pressing Ctrl-C followed by Ctrl-D). We now track
whether any keyboard input was sent to distinguish user-initiated exits
from shell spawn failures.

Release Notes:

- Fixed terminal tab not closing when the shell exits with a non-zero
code.

Co-authored-by: Glenn Miao <one.lemorage@gmail.com>
80b86cef24Smit Barmase committed on 3/27/2026, 7:25:12 AM· committed by GitHubparent5197cb4
1 file changedLine totals unavailable