Skip to content

Commit 8f3f8d7

Browse files
committed
fix #95 restore name of first window
1 parent 7c77c70 commit 8f3f8d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scripts/restore.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ restore_pane() {
170170
window_name="$(remove_first_char "$window_name")"
171171
pane_full_command="$(remove_first_char "$pane_full_command")"
172172
if pane_exists "$session_name" "$window_number" "$pane_index"; then
173+
tmux rename-window -t "$window_number" "$window_name"
173174
if is_restoring_from_scratch; then
174175
# overwrite the pane
175176
# happens only for the first pane if it's the only registered pane for the whole tmux server
@@ -182,6 +183,7 @@ restore_pane() {
182183
register_existing_pane "$session_name" "$window_number" "$pane_index"
183184
fi
184185
elif window_exists "$session_name" "$window_number"; then
186+
tmux rename-window -t "$window_number" "$window_name"
185187
new_pane "$session_name" "$window_number" "$window_name" "$dir" "$pane_index"
186188
elif session_exists "$session_name"; then
187189
new_window "$session_name" "$window_number" "$window_name" "$dir" "$pane_index"

0 commit comments

Comments
 (0)