summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-03-07 23:46:28 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-03-07 23:46:28 +0000
commitf1ab809368396ce843eb430aa5044a3d98e520d3 (patch)
treef221f707f3cb26a18789a07c6f458f332638fae7 /usr.bin/tmux/tty.c
parentcfd60bb436ec323a029a43130c30f34f22901653 (diff)
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.
Diffstat (limited to 'usr.bin/tmux/tty.c')
-rw-r--r--usr.bin/tmux/tty.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index 2a49f1af055..a24a42e4b6f 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.99 2011/01/29 08:39:43 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.100 2011/03/07 23:46:27 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -932,6 +932,16 @@ tty_cmd_utf8character(struct tty *tty, const struct tty_ctx *ctx)
}
void
+tty_cmd_rawstring(struct tty *tty, const struct tty_ctx *ctx)
+{
+ u_int i;
+ u_char *str = ctx->ptr;
+
+ for (i = 0; i < ctx->num; i++)
+ tty_putc(tty, str[i]);
+}
+
+void
tty_cell(
struct tty *tty, const struct grid_cell *gc, const struct grid_utf8 *gu)
{