mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-12-18 04:38:49 +00:00
Merge pull request #220 from kevinkjt2000/fix-issue-95
fix #95 restore name of first window
This commit is contained in:
commit
b020b2481e
@ -170,6 +170,7 @@ restore_pane() {
|
|||||||
window_name="$(remove_first_char "$window_name")"
|
window_name="$(remove_first_char "$window_name")"
|
||||||
pane_full_command="$(remove_first_char "$pane_full_command")"
|
pane_full_command="$(remove_first_char "$pane_full_command")"
|
||||||
if pane_exists "$session_name" "$window_number" "$pane_index"; then
|
if pane_exists "$session_name" "$window_number" "$pane_index"; then
|
||||||
|
tmux rename-window -t "$window_number" "$window_name"
|
||||||
if is_restoring_from_scratch; then
|
if is_restoring_from_scratch; then
|
||||||
# overwrite the pane
|
# overwrite the pane
|
||||||
# happens only for the first pane if it's the only registered pane for the whole tmux server
|
# happens only for the first pane if it's the only registered pane for the whole tmux server
|
||||||
@ -182,6 +183,7 @@ restore_pane() {
|
|||||||
register_existing_pane "$session_name" "$window_number" "$pane_index"
|
register_existing_pane "$session_name" "$window_number" "$pane_index"
|
||||||
fi
|
fi
|
||||||
elif window_exists "$session_name" "$window_number"; then
|
elif window_exists "$session_name" "$window_number"; then
|
||||||
|
tmux rename-window -t "$window_number" "$window_name"
|
||||||
new_pane "$session_name" "$window_number" "$window_name" "$dir" "$pane_index"
|
new_pane "$session_name" "$window_number" "$window_name" "$dir" "$pane_index"
|
||||||
elif session_exists "$session_name"; then
|
elif session_exists "$session_name"; then
|
||||||
new_window "$session_name" "$window_number" "$window_name" "$dir" "$pane_index"
|
new_window "$session_name" "$window_number" "$window_name" "$dir" "$pane_index"
|
||||||
|
Loading…
Reference in New Issue
Block a user