Mercurial > hg > nnchat
changeset 341:ece94ae2a051
Handling of certain Curses keycodes only works as intended under
PDCurses (Win32), so #ifdef the code out when working under NCurses.
Specifically KEY_RESIZE's code is defined differently under NCurses vs.
PDCurses, causing problems with terminal resizes if the PDCurses specific
key handling code is enabled.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 23 Jun 2011 01:22:44 +0300 |
parents | cbbe2e797f55 |
children | adc615a6b4e5 |
files | nnchat.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/nnchat.c Thu Jun 23 00:50:02 2011 +0300 +++ b/nnchat.c Thu Jun 23 01:22:44 2011 +0300 @@ -1580,7 +1580,9 @@ if (optDebug) printMsg(currWin, "Unhandled ESC key sequence 0x%02x\n", c); } - } else + } +#if defined(__WIN32) && defined(PDCURSES) + else if (c >= 0x198 && c <= 0x1a0) { /* Chat window switching via Meta/Esc-[1..9] */ int win = c - 0x198; @@ -1590,6 +1592,7 @@ } c = ERR; } +#endif switch (c) { #ifdef KEY_RESIZE