mirror of
https://github.com/tmate-io/tmate.git
synced 2025-02-17 02:41:07 +01:00
Add control_write_buffer, from George Nachman.
This commit is contained in:
parent
42272dfbd5
commit
84612a8196
@ -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)
|
||||
|
1
tmux.h
1
tmux.h
@ -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 *);
|
||||
|
Loading…
Reference in New Issue
Block a user