diff options
-rw-r--r-- | control.c | 9 | ||||
-rw-r--r-- | tmux.h | 1 |
2 files changed, 10 insertions, 0 deletions
@@ -79,6 +79,15 @@ control_write(struct client *c, const char *fmt, ...) server_push_stdout(c); } +/* Write a buffer, adding a terminal newline. Empties buffer. */ +void +control_write_buffer(struct client *c, struct evbuffer *buffer) +{ + evbuffer_add_buffer(c->stdout_data, buffer); + evbuffer_add(c->stdout_data, "\n", 1); + server_push_stdout(c); +} + /* Control input callback. Read lines and fire commands. */ void control_callback(struct client *c, int closed, unused void *data) @@ -2221,6 +2221,7 @@ void clear_signals(int); /* control.c */ void control_callback(struct client *, int, void*); void printflike2 control_write(struct client *, const char *, ...); +void control_write_buffer(struct client *, struct evbuffer *); /* control-notify.c */ void control_notify_window_layout_changed(struct window *); |