Data is passed to client in bulk with no character set or unicode conversion. This is meant to be used to pass through data that wont be appearing on the client tty; thus no change is made to screen memory.
The data is only passed to clients that are currently displaying the sending window. A future improvement would allow for any interested client to receive the data. This would allow transparent local printing even when working in a different window. --- screen-write.c | 12 ++++++++++++ tmux.h | 2 ++ tty.c | 6 ++++++ 3 files changed, 20 insertions(+) diff --git a/screen-write.c b/screen-write.c index 2b373d7..ddd1891 100644 --- a/screen-write.c +++ b/screen-write.c @@ -1249,6 +1249,18 @@ screen_write_setselection(struct screen_write_ctx *ctx, u_char *str, u_int len) } void +screen_write_verbatim(struct screen_write_ctx *ctx, struct evbuffer *evb) +{ + struct tty_ctx ttyctx; + + screen_write_initctx(ctx, &ttyctx, 0); + ttyctx.ptr = EVBUFFER_DATA(evb); + ttyctx.num = EVBUFFER_LENGTH(evb); + + tty_write(tty_cmd_verbatim, &ttyctx); +} + +void screen_write_rawstring(struct screen_write_ctx *ctx, u_char *str, u_int len) { struct tty_ctx ttyctx; diff --git a/tmux.h b/tmux.h index 49f053f..67713b1 100644 --- a/tmux.h +++ b/tmux.h @@ -1586,6 +1586,7 @@ void tty_cmd_utf8character(struct tty *, const struct tty_ctx *); void tty_cmd_reverseindex(struct tty *, const struct tty_ctx *); void tty_cmd_setselection(struct tty *, const struct tty_ctx *); void tty_cmd_rawstring(struct tty *, const struct tty_ctx *); +void tty_cmd_verbatim(struct tty *tty, const struct tty_ctx *ctx); void tty_bell(struct tty *); /* tty-term.c */ @@ -1989,6 +1990,7 @@ void screen_write_cell(struct screen_write_ctx *, void screen_write_setselection(struct screen_write_ctx *, u_char *, u_int); void screen_write_rawstring(struct screen_write_ctx *, u_char *, u_int); void screen_write_bracketpaste(struct screen_write_ctx *, int); +void screen_write_verbatim(struct screen_write_ctx *, struct evbuffer *); /* screen-redraw.c */ void screen_redraw_screen(struct client *, int, int); diff --git a/tty.c b/tty.c index 6d77e89..c465fec 100644 --- a/tty.c +++ b/tty.c @@ -1103,6 +1103,12 @@ tty_cmd_setselection(struct tty *tty, const struct tty_ctx *ctx) } void +tty_cmd_verbatim(struct tty *tty, const struct tty_ctx *ctx) +{ + bufferevent_write(tty->event, ctx->ptr, ctx->num); +} + +void tty_cmd_rawstring(struct tty *tty, const struct tty_ctx *ctx) { u_int i; -- 1.7.10.4 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users