aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2009-12-04 22:05:52 +0000
committerTiago Cunha <tcunha@gmx.com>2009-12-04 22:05:52 +0000
commitddb5bb80fa9b24f47a1e5af9d808427d316bcf4a (patch)
tree2ee022233f29c3e041d87f884a6b17b4cab20d90
parent4ba8fce7ea683f5447022d5e55b0e824044b04c2 (diff)
downloadrtmux-ddb5bb80fa9b24f47a1e5af9d808427d316bcf4a.tar.gz
rtmux-ddb5bb80fa9b24f47a1e5af9d808427d316bcf4a.tar.bz2
rtmux-ddb5bb80fa9b24f47a1e5af9d808427d316bcf4a.zip
Sync OpenBSD patchset 579:
Reflect the keypad mode of the application so that numlock works.
-rw-r--r--tty.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tty.c b/tty.c
index 2a1d4b1f..ba0071be 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.179 2009-11-28 14:59:26 tcunha Exp $ */
+/* $Id: tty.c,v 1.180 2009-12-04 22:05:52 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -185,7 +185,7 @@ tty_start_tty(struct tty *tty)
tty_putcode(tty, TTYC_SGR0);
memcpy(&tty->cell, &grid_default_cell, sizeof tty->cell);
- tty_putcode(tty, TTYC_SMKX);
+ tty_putcode(tty, TTYC_RMKX);
tty_putcode(tty, TTYC_ENACS);
tty_putcode(tty, TTYC_CLEAR);
@@ -415,6 +415,12 @@ tty_update_mode(struct tty *tty, int mode)
else
tty_puts(tty, "\033[?1000l");
}
+ if (changed & MODE_KKEYPAD) {
+ if (mode & MODE_KKEYPAD)
+ tty_putcode(tty, TTYC_SMKX);
+ else
+ tty_putcode(tty, TTYC_RMKX);
+ }
tty->mode = mode;
}