summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/input.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2009-08-19 17:00:32 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2009-08-19 17:00:32 +0000
commit79f1dfd34233681fd6b75f788a42fa4caeaa2bb1 (patch)
tree5bf350023f73e655d942bad76a2298074b702bc5 /usr.bin/tmux/input.c
parent4a8a01d35f4b9c36930ca8a50dadbd7554d865a6 (diff)
Handle the device attributes (DA) escape sequence.
Diffstat (limited to 'usr.bin/tmux/input.c')
-rw-r--r--usr.bin/tmux/input.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/usr.bin/tmux/input.c b/usr.bin/tmux/input.c
index 0fb7f552f41..8a9561f0248 100644
--- a/usr.bin/tmux/input.c
+++ b/usr.bin/tmux/input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input.c,v 1.13 2009/08/18 21:41:13 nicm Exp $ */
+/* $OpenBSD: input.c,v 1.14 2009/08/19 17:00:31 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -68,6 +68,7 @@ void input_handle_sequence_cuf(struct input_ctx *);
void input_handle_sequence_cub(struct input_ctx *);
void input_handle_sequence_dch(struct input_ctx *);
void input_handle_sequence_cbt(struct input_ctx *);
+void input_handle_sequence_da(struct input_ctx *);
void input_handle_sequence_dl(struct input_ctx *);
void input_handle_sequence_ich(struct input_ctx *);
void input_handle_sequence_il(struct input_ctx *);
@@ -104,6 +105,7 @@ const struct input_sequence_entry input_sequence_table[] = {
{ 'M', input_handle_sequence_dl },
{ 'P', input_handle_sequence_dch },
{ 'Z', input_handle_sequence_cbt },
+ { 'c', input_handle_sequence_da },
{ 'd', input_handle_sequence_vpa },
{ 'f', input_handle_sequence_cup },
{ 'g', input_handle_sequence_tbc },
@@ -952,6 +954,25 @@ input_handle_sequence_cbt(struct input_ctx *ictx)
}
void
+input_handle_sequence_da(struct input_ctx *ictx)
+{
+ struct screen *s = ictx->ctx.s;
+ uint16_t n;
+
+ if (ictx->private != '\0')
+ return;
+
+ if (ARRAY_LENGTH(&ictx->args) > 1)
+ return;
+ if (input_get_argument(ictx, 0, &n, 0) != 0)
+ return;
+ if (n != 0)
+ return;
+
+ buffer_write(ictx->wp->out, "\033[?1;2c", (sizeof "\033[?1;2c") - 1);
+}
+
+void
input_handle_sequence_dl(struct input_ctx *ictx)
{
uint16_t n;