completed.
-/* $OpenBSD: cmd-find.c,v 1.79 2020/05/16 16:20:59 nicm Exp $ */
+/* $OpenBSD: cmd-find.c,v 1.80 2022/07/06 08:31:59 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
found = cmd_find_best_client(s);
}
if (found == NULL && item != NULL && !quiet)
- cmdq_error(item, "no current client");
+ abort();//cmdq_error(item, "no current client");
log_debug("%s: no target, return %p", __func__, found);
return (found);
}
-/* $OpenBSD: control.c,v 1.47 2021/08/25 07:09:30 nicm Exp $ */
+/* $OpenBSD: control.c,v 1.48 2022/07/06 08:31:59 nicm Exp $ */
/*
* Copyright (c) 2012 Nicholas Marriott <nicholas.marriott@gmail.com>
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;
}
}
+/* 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)
-/* $OpenBSD: server-client.c,v 1.395 2022/05/30 12:55:25 nicm Exp $ */
+/* $OpenBSD: server-client.c,v 1.396 2022/07/06 08:31:59 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
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);
}
-/* $OpenBSD: tmux.h,v 1.1177 2022/07/06 07:36:36 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.1178 2022/07/06 08:31:59 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
/* 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 *);