aboutsummaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2009-01-10 22:28:40 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2009-01-10 22:28:40 +0000
commitee0a7cda880f01771470b2902839c5d6396057c3 (patch)
tree356e4a9bd6b3e2c48c9d204d876a20ec7477b2bc /tty.c
parent736117e4e97a1a060777e8469c8091553a09a807 (diff)
downloadrtmux-ee0a7cda880f01771470b2902839c5d6396057c3.tar.gz
rtmux-ee0a7cda880f01771470b2902839c5d6396057c3.tar.bz2
rtmux-ee0a7cda880f01771470b2902839c5d6396057c3.zip
Restore emulation of ich with insert mode.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index aad33009..c3ae5b5c 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.56 2009-01-10 01:51:22 nicm Exp $ */
+/* $Id: tty.c,v 1.57 2009-01-10 22:28:40 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -411,7 +411,16 @@ tty_cmd_insertcharacter(struct tty *tty, unused struct screen *s, va_list ap)
tty_reset(tty);
- tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ua);
+ if (tty_term_has(tty->term, TTYC_ICH) ||
+ tty_term_has(tty->term, TTYC_ICH1))
+ tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ua);
+ else {
+ tty_putcode(tty, TTYC_SMIR);
+ while (ua-- > 0)
+ tty_putc(tty, ' ');
+ tty_putcode(tty, TTYC_RMIR);
+ tty_putcode2(tty, TTYC_CUP, s->cy, s->cx);
+ }
}
void