Zoomed panes are now like full screen floating panes.

This commit is contained in:
Michael Grant
2026-09-30 23:10:40 +01:00
parent 5a820e63b7
commit 7810f8abf3
29 changed files with 752 additions and 621 deletions

View File

@@ -155,7 +155,7 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
struct winlink *wl = target->wl;
struct window *w = wl->window;
struct session *s = target->s;
struct window_pane *wp = target->wp, *lastwp;
struct window_pane *wp = target->wp, *lastwp, *zwp = NULL;
struct options *oo = wp->options;
char *title;
const char *style;
@@ -190,15 +190,17 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
visible = 1;
else
visible = window_pane_is_visible(lastwp);
if (!visible && window_push_zoom(w, 0, Zflag))
server_redraw_window(w);
if (!visible && Zflag)
zwp = window_zoomed_pane(w);
window_redraw_active_switch(w, lastwp);
if (window_set_active_pane(w, lastwp, 1)) {
cmd_find_from_winlink(current, wl, 0);
cmd_select_pane_redraw(w);
}
if (!visible && window_pop_zoom(w))
if (zwp != NULL) {
window_zoom_move(zwp, lastwp);
server_redraw_window(w);
}
}
return (CMD_RETURN_NORMAL);
}
@@ -221,23 +223,14 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
return (CMD_RETURN_NORMAL);
}
if (args_has(args, 'L')) {
window_push_zoom(w, 0, 1);
if (args_has(args, 'L'))
wp = window_pane_find_left(wp);
window_pop_zoom(w);
} else if (args_has(args, 'R')) {
window_push_zoom(w, 0, 1);
else if (args_has(args, 'R'))
wp = window_pane_find_right(wp);
window_pop_zoom(w);
} else if (args_has(args, 'U')) {
window_push_zoom(w, 0, 1);
else if (args_has(args, 'U'))
wp = window_pane_find_up(wp);
window_pop_zoom(w);
} else if (args_has(args, 'D')) {
window_push_zoom(w, 0, 1);
else if (args_has(args, 'D'))
wp = window_pane_find_down(wp);
window_pop_zoom(w);
}
if (wp == NULL)
return (CMD_RETURN_NORMAL);
@@ -277,15 +270,17 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
visible = 1;
else
visible = window_pane_is_visible(wp);
if (!visible && window_push_zoom(w, 0, Zflag))
server_redraw_window(w);
if (!visible && Zflag)
zwp = window_zoomed_pane(w);
window_redraw_active_switch(w, wp);
if (window_set_active_pane(w, wp, 1))
cmd_find_from_winlink_pane(current, wl, wp, 0);
cmdq_insert_hook(s, item, current, "after-select-pane");
cmd_select_pane_redraw(w);
if (!visible && window_pop_zoom(w))
if (zwp != NULL) {
window_zoom_move(zwp, wp);
server_redraw_window(w);
}
return (CMD_RETURN_NORMAL);
}