Also trap SIGTERM to cleanup

This commit is contained in:
Kovid Goyal 2022-05-27 12:39:22 +05:30
parent bd84ec03ce
commit c5e5ec618d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -472,7 +472,7 @@ edit-in-kitty() {
builtin local old_tty_settings=$(builtin command stty -g)
builtin command stty "-echo"
builtin trap "builtin command stty '$old_tty_settings'" EXIT
builtin trap "builtin command stty '$old_tty_settings'; _ksi_transmit_data 'abort_signaled=interrupt' 'edit'; return 1;" INT
builtin trap "builtin command stty '$old_tty_settings'; _ksi_transmit_data 'abort_signaled=interrupt' 'edit'; return 1;" INT TERM
while :; do
started="n"
while IFS= read -r line; do