Merge branch 'obsd-master'

pull/3255/head
Thomas Adam 2022-07-06 12:01:09 +01:00
commit dc6bc0e95a
6 changed files with 26 additions and 13 deletions

View File

@ -158,6 +158,9 @@ cmd_attach_session(struct cmdq_item *item, const char *tflag, int dflag,
c->flags |= CLIENT_ATTACHED;
}
if (cfg_finished)
cfg_show_causes(s);
return (CMD_RETURN_NORMAL);
}

View File

@ -333,13 +333,6 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
server_client_set_key_table(c, NULL);
}
/*
* If there are still configuration file errors to display, put the new
* session's current window into view mode and display them now.
*/
if (cfg_finished)
cfg_show_causes(s);
/* Print if requested. */
if (args_has(args, 'P')) {
if ((template = args_get(args, 'F')) == NULL)
@ -357,6 +350,9 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
cmd_find_from_session(&fs, s, 0);
cmdq_insert_hook(s, item, &fs, "after-new-session");
if (cfg_finished)
cfg_show_causes(s);
if (sc.argv != NULL)
cmd_free_argv(sc.argc, sc.argv);
free(cwd);

View File

@ -775,7 +775,6 @@ control_start(struct client *c)
cs->read_event = bufferevent_new(c->fd, control_read_callback,
control_write_callback, control_error_callback, c);
bufferevent_enable(cs->read_event, EV_READ);
if (c->flags & CLIENT_CONTROLCONTROL)
cs->write_event = cs->read_event;
@ -792,6 +791,13 @@ control_start(struct client *c)
}
}
/* Control client ready. */
void
control_ready(struct client *c)
{
bufferevent_enable(c->control_state->read_event, EV_READ);
}
/* Discard all output for a client. */
void
control_discard(struct client *c)

View File

@ -2788,8 +2788,11 @@ server_client_command_done(struct cmdq_item *item, __unused void *data)
if (~c->flags & CLIENT_ATTACHED)
c->flags |= CLIENT_EXIT;
else if (~c->flags & CLIENT_EXIT)
else if (~c->flags & CLIENT_EXIT) {
if (c->flags & CLIENT_CONTROL)
control_ready(c);
tty_send_requests(&c->tty);
}
return (CMD_RETURN_NORMAL);
}

12
tmux.1
View File

@ -2115,9 +2115,11 @@ is not given, "detach-client -t '%%'" is used.
specifies the initial sort field: one of
.Ql name ,
.Ql size ,
.Ql creation ,
.Ql creation
(time),
or
.Ql activity .
.Ql activity
(time).
.Fl r
reverses the sort order.
.Fl f
@ -2199,7 +2201,8 @@ specifies the initial sort field: one of
.Ql index ,
.Ql name ,
or
.Ql time .
.Ql time
(activity).
.Fl r
reverses the sort order.
.Fl f
@ -6110,7 +6113,8 @@ is not given, "paste-buffer -b '%%'" is used.
.Pp
.Fl O
specifies the initial sort field: one of
.Ql time ,
.Ql time
(creation),
.Ql name
or
.Ql size .

1
tmux.h
View File

@ -3136,6 +3136,7 @@ char *parse_window_name(const char *);
/* control.c */
void control_discard(struct client *);
void control_start(struct client *);
void control_ready(struct client *);
void control_stop(struct client *);
void control_set_pane_on(struct client *, struct window_pane *);
void control_set_pane_off(struct client *, struct window_pane *);