aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-11-09 17:06:01 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-11-09 17:06:01 +0000
commit5940c5ff8853e1920d89c7a59ada707c716c6f30 (patch)
tree45a1677c9d83c7301873b3cb2cd4d5f8cd515151 /input.c
parenteeba70afc8a3c96cb22e4f61e9c778c1e24c95f7 (diff)
downloadrtmux-5940c5ff8853e1920d89c7a59ada707c716c6f30.tar.gz
rtmux-5940c5ff8853e1920d89c7a59ada707c716c6f30.tar.bz2
rtmux-5940c5ff8853e1920d89c7a59ada707c716c6f30.zip
Support tab.
Diffstat (limited to 'input.c')
-rw-r--r--input.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/input.c b/input.c
index 8f12e4f4..35c8bb39 100644
--- a/input.c
+++ b/input.c
@@ -1,4 +1,4 @@
-/* $Id: input.c,v 1.29 2007-10-26 17:15:50 nicm Exp $ */
+/* $Id: input.c,v 1.30 2007-11-09 17:06:01 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -405,6 +405,15 @@ input_handle_c0_control(u_char ch, struct input_ctx *ictx)
if (s->cx > 0)
s->cx--;
break;
+ case '\011': /* TAB */
+ s->cx = ((s->cx / 8) * 8) + 8;
+ if (s->cx > s->sx) {
+ s->cx = 0;
+ screen_cursor_down_scroll(s);
+ }
+ input_store_two(
+ ictx->b, CODE_CURSORMOVE, s->cy + 1, s->cx + 1);
+ return;
default:
log_debug("unknown c0: %hhu", ch);
return;