mirror of
https://github.com/tmux/tmux.git
synced 2025-01-05 23:38:48 +00:00
On select-window, make this client the latest client for the window.
This commit is contained in:
parent
e8ca5a4c7d
commit
c2167c5ee8
@ -85,6 +85,7 @@ static enum cmd_retval
|
|||||||
cmd_select_window_exec(struct cmd *self, struct cmdq_item *item)
|
cmd_select_window_exec(struct cmd *self, struct cmdq_item *item)
|
||||||
{
|
{
|
||||||
struct args *args = cmd_get_args(self);
|
struct args *args = cmd_get_args(self);
|
||||||
|
struct client *c = cmdq_get_client(item);
|
||||||
struct cmd_find_state *current = cmdq_get_current(item);
|
struct cmd_find_state *current = cmdq_get_current(item);
|
||||||
struct cmd_find_state *target = cmdq_get_target(item);
|
struct cmd_find_state *target = cmdq_get_target(item);
|
||||||
struct winlink *wl = target->wl;
|
struct winlink *wl = target->wl;
|
||||||
@ -141,6 +142,8 @@ cmd_select_window_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
}
|
}
|
||||||
cmdq_insert_hook(s, item, current, "after-select-window");
|
cmdq_insert_hook(s, item, current, "after-select-window");
|
||||||
}
|
}
|
||||||
|
if (c->session != NULL)
|
||||||
|
s->curw->window->latest = c;
|
||||||
recalculate_sizes();
|
recalculate_sizes();
|
||||||
|
|
||||||
return (CMD_RETURN_NORMAL);
|
return (CMD_RETURN_NORMAL);
|
||||||
|
Loading…
Reference in New Issue
Block a user