Merge pull request #67 from IngoHeimbach/fix/window-renaming
Fix unintentional window renaming
This commit is contained in:
commit
27a822c99a
|
@ -13,7 +13,7 @@ fingers_pane_id=$2
|
|||
last_pane_id=$3
|
||||
fingers_window_id=$4
|
||||
pane_input_temp=$5
|
||||
original_rename_setting=$6
|
||||
original_window_name=$6
|
||||
|
||||
BACKSPACE=$'\177'
|
||||
|
||||
|
@ -47,7 +47,7 @@ function zoom_pane() {
|
|||
|
||||
function revert_to_original_pane() {
|
||||
tmux swap-pane -s "$current_pane_id" -t "$fingers_pane_id"
|
||||
tmux set-window-option automatic-rename "$original_rename_setting"
|
||||
tmux rename-window "$original_window_name"
|
||||
|
||||
if [[ ! -z "$last_pane_id" ]]; then
|
||||
tmux select-pane -t "$last_pane_id"
|
||||
|
|
|
@ -58,9 +58,9 @@ function prompt_fingers_for_pane() {
|
|||
|
||||
capture_pane "$current_pane_id" "$tmp_path"
|
||||
|
||||
local original_rename_setting=$(tmux show-window-option -gv automatic-rename)
|
||||
local original_window_name=$(tmux display-message -p '#{window_name}')
|
||||
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_window_name"
|
||||
|
||||
echo $fingers_pane_id
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue