diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-12-02 22:13:16 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2009-12-02 22:13:16 +0000 |
commit | 8224de735fc465c62347ad52d18620a9a61d00b4 (patch) | |
tree | 092ff5ee8e85a59d8a688919f92d5a67602dbf7b /usr.bin/tmux | |
parent | 01d8603dcdf909e1f98565670db25674ef648a05 (diff) |
Reflect the keypad mode of the application so that numlock works.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/tty.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 9099bf93af2..8b756501301 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.75 2009/11/27 09:41:03 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.76 2009/12/02 22:13:15 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -180,7 +180,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); @@ -410,6 +410,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; } |