# HG changeset patch # User Matti Hamalainen # Date 1308781364 -10800 # Node ID ece94ae2a0511aac390d9e00c91ee56c1eb4bc56 # Parent cbbe2e797f55e5750e991767062a02fa93fc3b34 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. diff -r cbbe2e797f55 -r ece94ae2a051 nnchat.c --- 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