fix dangling pane when canceling
This commit is contained in:
parent
6f0d594c11
commit
43779729c4
|
@ -20,6 +20,9 @@ original_rename_setting=$6
|
||||||
|
|
||||||
BACKSPACE=$'\177'
|
BACKSPACE=$'\177'
|
||||||
|
|
||||||
|
input=''
|
||||||
|
result=''
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||||
EXEC_PREFIX="nohup"
|
EXEC_PREFIX="nohup"
|
||||||
else
|
else
|
||||||
|
@ -59,8 +62,14 @@ function revert_to_original_pane() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handle_exit() {
|
function handle_exit() {
|
||||||
revert_to_original_pane
|
|
||||||
rm -rf "$pane_input_temp" "$pane_output_temp" "$match_lookup_table"
|
rm -rf "$pane_input_temp" "$pane_output_temp" "$match_lookup_table"
|
||||||
|
revert_to_original_pane
|
||||||
|
|
||||||
|
if [[ ! -z "$result" ]]; then
|
||||||
|
run_fingers_copy_command "$result" "$input"
|
||||||
|
fi
|
||||||
|
|
||||||
|
tmux kill-window -t "$fingers_window_id"
|
||||||
}
|
}
|
||||||
|
|
||||||
function is_valid_input() {
|
function is_valid_input() {
|
||||||
|
@ -199,7 +208,5 @@ while read -rsn1 char; do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
copy_result "$result" "$input"
|
copy_result "$result" "$input"
|
||||||
revert_to_original_pane
|
exit 0
|
||||||
run_fingers_copy_command "$result" "$input"
|
|
||||||
tmux kill-window -t "$fingers_window_id"
|
|
||||||
done < /dev/tty
|
done < /dev/tty
|
||||||
|
|
Loading…
Reference in New Issue