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

View File

@ -1054,7 +1054,7 @@ window_tree_kill_each(__unused void *modedata, void *itemdata,
break;
case WINDOW_TREE_WINDOW:
if (wl != NULL)
server_kill_window(wl->window);
server_kill_window(wl->window, 1);
break;
case WINDOW_TREE_PANE:
if (wp != NULL)