summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd-attach-session.c3
-rw-r--r--cmd-new-session.c10
-rw-r--r--control.c8
-rw-r--r--server-client.c5
-rw-r--r--tmux.112
-rw-r--r--tmux.h1
6 files changed, 26 insertions, 13 deletions
diff --git a/cmd-attach-session.c b/cmd-attach-session.c
index b92a7f2b..4e2d15da 100644
--- a/cmd-attach-session.c
+++ b/cmd-attach-session.c
@@ -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);
}
diff --git a/cmd-new-session.c b/cmd-new-session.c
index b946f049..c90369bc 100644
--- a/cmd-new-session.c
+++ b/cmd-new-session.c
@@ -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);
diff --git a/control.c b/control.c
index 73286e00..302c2956 100644
--- a/control.c
+++ b/control.c
@@ -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)
diff --git a/server-client.c b/server-client.c
index 8144bcd5..f1b32158 100644
--- a/server-client.c
+++ b/server-client.c
@@ -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);
}
diff --git a/tmux.1 b/tmux.1
index 8c475786..0c078fba 100644
--- a/tmux.1
+++ b/tmux.1
@@ -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 .
diff --git a/tmux.h b/tmux.h
index cd838df8..d097720e 100644
--- a/tmux.h
+++ b/tmux.h
@@ -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 *);