Fixed window name drop after restoring orig state
*Added extracting, passing and resetting of the original window name. This fixes the dissappearence of the custom window names.
This commit is contained in:
parent
0e1010d249
commit
42cfff5227
|
@ -17,6 +17,7 @@ last_pane_id=$3
|
|||
fingers_window_id=$4
|
||||
pane_input_temp=$5
|
||||
original_rename_setting=$6
|
||||
origin_window_name=$7
|
||||
|
||||
BACKSPACE=$'\177'
|
||||
|
||||
|
@ -43,6 +44,7 @@ function revert_to_original_pane() {
|
|||
tmux swap-pane -s "$current_pane_id" -t "$fingers_pane_id"
|
||||
tmux kill-window -t "$fingers_window_id"
|
||||
tmux set-window-option automatic-rename "$original_rename_setting"
|
||||
tmux rename-window "$origin_window_name"
|
||||
|
||||
if [[ ! -z "$last_pane_id" ]]; then
|
||||
tmux select-pane -t "$last_pane_id"
|
||||
|
|
|
@ -51,6 +51,7 @@ function prompt_fingers_for_pane() {
|
|||
local fingers_pane_id=$(echo "$fingers_init_data" | cut -f1 -d':')
|
||||
local fingers_window_id=$(echo "$fingers_init_data" | cut -f2 -d':')
|
||||
local tmp_path=$(fingers_tmp)
|
||||
local current_window_name=$(tmux display-message -p '#{window_name}')
|
||||
|
||||
wait
|
||||
|
||||
|
@ -58,7 +59,7 @@ function prompt_fingers_for_pane() {
|
|||
|
||||
local original_rename_setting=$(tmux show-window-option -gv automatic-rename)
|
||||
tmux set-window-option automatic-rename off
|
||||
pane_exec "$fingers_pane_id" "cat $tmp_path | $CURRENT_DIR/fingers.sh \"$current_pane_id\" \"$fingers_pane_id\" \"$last_pane_id\" \"$fingers_window_id\" $tmp_path $original_rename_setting"
|
||||
pane_exec "$fingers_pane_id" "cat $tmp_path | $CURRENT_DIR/fingers.sh \"$current_pane_id\" \"$fingers_pane_id\" \"$last_pane_id\" \"$fingers_window_id\" $tmp_path $original_rename_setting $current_window_name"
|
||||
|
||||
echo $fingers_pane_id
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue