Support passing through escape sequences to the underlying terminal by

using DCS with a "tmux;" prefix. Escape characters in the sequences must
be doubled. For example:

$ printf '\033Ptmux;\033\033]12;red\007\033\\'

Will pass \033]12;red\007 to the terminal (and change the cursor colour
in xterm). From Kevin Goodsell.
This commit is contained in:
Nicholas Marriott
2011-03-07 23:46:27 +00:00
parent d5ed5fb08f
commit 79e30daeae
4 changed files with 73 additions and 24 deletions

View File

@ -1191,3 +1191,15 @@ screen_write_overwrite(struct screen_write_ctx *ctx, u_int width)
grid_view_set_cell(gd, xx, s->cy, &grid_default_cell);
}
}
void
screen_write_rawstring(struct screen_write_ctx *ctx, u_char *str, u_int len)
{
struct tty_ctx ttyctx;
screen_write_initctx(ctx, &ttyctx, 0);
ttyctx.ptr = str;
ttyctx.num = len;
tty_write(tty_cmd_rawstring, &ttyctx);
}