Redraw status line and borders on pane enable/disable, GitHub issue 2554.

This commit is contained in:
nicm 2021-02-04 14:02:24 +00:00
parent f0546b0ff8
commit c13f2e1135

View File

@ -108,11 +108,15 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
cmdq_error(item, "no last pane"); cmdq_error(item, "no last pane");
return (CMD_RETURN_ERROR); return (CMD_RETURN_ERROR);
} }
if (args_has(args, 'e')) if (args_has(args, 'e')) {
lastwp->flags &= ~PANE_INPUTOFF; lastwp->flags &= ~PANE_INPUTOFF;
else if (args_has(args, 'd')) server_redraw_window_borders(lastwp->window);
server_status_window(lastwp->window);
} else if (args_has(args, 'd')) {
lastwp->flags |= PANE_INPUTOFF; lastwp->flags |= PANE_INPUTOFF;
else { server_redraw_window_borders(lastwp->window);
server_status_window(lastwp->window);
} else {
if (window_push_zoom(w, args_has(args, 'Z'))) if (window_push_zoom(w, args_has(args, 'Z')))
server_redraw_window(w); server_redraw_window(w);
window_redraw_active_switch(w, lastwp); window_redraw_active_switch(w, lastwp);
@ -188,10 +192,14 @@ cmd_select_pane_exec(struct cmd *self, struct cmdq_item *item)
if (args_has(args, 'e')) { if (args_has(args, 'e')) {
wp->flags &= ~PANE_INPUTOFF; wp->flags &= ~PANE_INPUTOFF;
server_redraw_window_borders(wp->window);
server_status_window(wp->window);
return (CMD_RETURN_NORMAL); return (CMD_RETURN_NORMAL);
} }
if (args_has(args, 'd')) { if (args_has(args, 'd')) {
wp->flags |= PANE_INPUTOFF; wp->flags |= PANE_INPUTOFF;
server_redraw_window_borders(wp->window);
server_status_window(wp->window);
return (CMD_RETURN_NORMAL); return (CMD_RETURN_NORMAL);
} }