Sync OpenBSD patchset 579:

Reflect the keypad mode of the application so that numlock works.
pull/1/head
Tiago Cunha 2009-12-04 22:05:52 +00:00
parent 4ba8fce7ea
commit ddb5bb80fa
1 changed files with 8 additions and 2 deletions

10
tty.c
View File

@ -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;
}