Bring over some of layout and positioning code for floating panes, by

Michael Grant.
This commit is contained in:
nicm
2026-05-17 16:01:42 +00:00
parent f12d7b4e67
commit a8520ba59e
12 changed files with 282 additions and 133 deletions

View File

@@ -103,7 +103,7 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
* spawned without being visited (for example split-window -d).
*/
lastwp = TAILQ_FIRST(&w->last_panes);
if (lastwp == NULL && window_count_panes(w) == 2) {
if (lastwp == NULL && window_count_panes(w, 1) == 2) {
lastwp = TAILQ_PREV(w->active, window_panes, entry);
if (lastwp == NULL)
lastwp = TAILQ_NEXT(w->active, entry);