mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Kill empty window after moving pane and updating current window, so that
index is still valid before renumber-windows happens. Fixes issue reported by Eric Pruitt.
This commit is contained in:
parent
6bf033beae
commit
537964b92d
@ -136,11 +136,6 @@ join_pane(struct cmd *self, struct cmd_q *cmdq, int not_same_window)
|
||||
window_lost_pane(src_w, src_wp);
|
||||
TAILQ_REMOVE(&src_w->panes, src_wp, entry);
|
||||
|
||||
if (window_count_panes(src_w) == 0)
|
||||
server_kill_window(src_w);
|
||||
else
|
||||
notify_window_layout_changed(src_w);
|
||||
|
||||
src_wp->window = dst_w;
|
||||
TAILQ_INSERT_AFTER(&dst_w->panes, dst_wp, src_wp, entry);
|
||||
layout_assign_pane(lc, src_wp);
|
||||
@ -157,6 +152,11 @@ join_pane(struct cmd *self, struct cmd_q *cmdq, int not_same_window)
|
||||
} else
|
||||
server_status_session(dst_s);
|
||||
|
||||
if (window_count_panes(src_w) == 0)
|
||||
server_kill_window(src_w);
|
||||
else
|
||||
notify_window_layout_changed(src_w);
|
||||
notify_window_layout_changed(dst_w);
|
||||
|
||||
return (CMD_RETURN_NORMAL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user