summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2012-05-22 09:36:13 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2012-05-22 09:36:13 +0000
commite4f16e73e6ca7d18033c64356b320d6dc69fdb55 (patch)
treee3d522b31b070ee254f5e7857f5df25a4b077fdd /usr.bin
parent40483d4208a15daf8ffbd3a51470be89578dbacb (diff)
If there are any terminals with insert mode but not ich1, they can go
through the slow path. Tidies code slightly.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/tmux.h4
-rw-r--r--usr.bin/tmux/tty-term.c4
-rw-r--r--usr.bin/tmux/tty.c9
3 files changed, 4 insertions, 13 deletions
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index eee0d554bff..98580934089 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.332 2012/05/21 18:27:42 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.333 2012/05/22 09:36:12 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -316,7 +316,6 @@ enum tty_code_code {
TTYC_RI, /* scroll_reverse, sr */
TTYC_RMACS, /* exit_alt_charset_mode */
TTYC_RMCUP, /* exit_ca_mode, te */
- TTYC_RMIR, /* exit_insert_mode, ei */
TTYC_RMKX, /* keypad_local, ke */
TTYC_SETAB, /* set_a_background, AB */
TTYC_SETAF, /* set_a_foreground, AF */
@@ -324,7 +323,6 @@ enum tty_code_code {
TTYC_SITM, /* enter_italics_mode, it */
TTYC_SMACS, /* enter_alt_charset_mode, as */
TTYC_SMCUP, /* enter_ca_mode, ti */
- TTYC_SMIR, /* enter_insert_mode, im */
TTYC_SMKX, /* keypad_xmit, ks */
TTYC_SMSO, /* enter_standout_mode, so */
TTYC_SMUL, /* enter_underline_mode, us */
diff --git a/usr.bin/tmux/tty-term.c b/usr.bin/tmux/tty-term.c
index 6ecba5cd7b8..3bd0e3a6ec8 100644
--- a/usr.bin/tmux/tty-term.c
+++ b/usr.bin/tmux/tty-term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty-term.c,v 1.27 2011/12/01 23:47:08 nicm Exp $ */
+/* $OpenBSD: tty-term.c,v 1.28 2012/05/22 09:36:12 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -174,7 +174,6 @@ const struct tty_term_code_entry tty_term_codes[NTTYCODE] = {
{ TTYC_RI, TTYCODE_STRING, "ri" },
{ TTYC_RMACS, TTYCODE_STRING, "rmacs" },
{ TTYC_RMCUP, TTYCODE_STRING, "rmcup" },
- { TTYC_RMIR, TTYCODE_STRING, "rmir" },
{ TTYC_RMKX, TTYCODE_STRING, "rmkx" },
{ TTYC_SETAB, TTYCODE_STRING, "setab" },
{ TTYC_SETAF, TTYCODE_STRING, "setaf" },
@@ -182,7 +181,6 @@ const struct tty_term_code_entry tty_term_codes[NTTYCODE] = {
{ TTYC_SITM, TTYCODE_STRING, "sitm" },
{ TTYC_SMACS, TTYCODE_STRING, "smacs" },
{ TTYC_SMCUP, TTYCODE_STRING, "smcup" },
- { TTYC_SMIR, TTYCODE_STRING, "smir" },
{ TTYC_SMKX, TTYCODE_STRING, "smkx" },
{ TTYC_SMSO, TTYCODE_STRING, "smso" },
{ TTYC_SMUL, TTYCODE_STRING, "smul" },
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c
index db6eab74bb6..aa067f13574 100644
--- a/usr.bin/tmux/tty.c
+++ b/usr.bin/tmux/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.133 2012/05/22 09:09:16 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.134 2012/05/22 09:36:12 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -754,12 +754,7 @@ tty_cmd_insertcharacter(struct tty *tty, const struct tty_ctx *ctx)
if (tty_term_has(tty->term, TTYC_ICH) ||
tty_term_has(tty->term, TTYC_ICH1))
tty_emulate_repeat(tty, TTYC_ICH, TTYC_ICH1, ctx->num);
- else if (tty_term_has(tty->term, TTYC_SMIR) &&
- tty_term_has(tty->term, TTYC_RMIR)) {
- tty_putcode(tty, TTYC_SMIR);
- tty_repeat_space(tty, ctx->num);
- tty_putcode(tty, TTYC_RMIR);
- } else
+ else
tty_draw_line(tty, wp->screen, ctx->ocy, ctx->xoff, ctx->yoff);
}