kill-window -a cannot just walk the list of windows because if

renumber-windows is on, the window it wants to keep could be moved.
Change to renumber afterwards and also behave better if the window is
linked into the session twice. GitHub issue 2287.
This commit is contained in:
nicm
2020-07-04 14:24:02 +00:00
parent 43e1577b5d
commit 1e42689661
5 changed files with 75 additions and 31 deletions

4
tmux.h
View File

@ -2420,7 +2420,9 @@ void server_lock(void);
void server_lock_session(struct session *);
void server_lock_client(struct client *);
void server_kill_pane(struct window_pane *);
void server_kill_window(struct window *);
void server_kill_window(struct window *, int);
void server_renumber_session(struct session *);
void server_renumber_all(void);
int server_link_window(struct session *,
struct winlink *, struct session *, int, int, int, char **);
void server_unlink_window(struct session *, struct winlink *);