Mercurial > hg > nnchat
changeset 332:f55f8309aa66
Support alt-[1..9] under Windows/PDCurses/SDL port for buffer switching.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 20 Jun 2011 03:41:32 +0300 |
parents | 26097c5b9b71 |
children | 64946336548a |
files | nnchat.c |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/nnchat.c Tue Jun 14 17:02:12 2011 +0300 +++ b/nnchat.c Mon Jun 20 03:41:32 2011 +0300 @@ -1576,8 +1576,16 @@ else { if (optDebug) printMsg(currWin, "Unhandled ESC key sequence 0x%02x\n", c); - continue; } + } else + if (c >= 0x198 && c <= 0x1a0) { + /* Chat window switching via Meta/Esc-[1..9] */ + int win = c - 0x198; + if (win < SET_MAX_WINDOWS && chatWindows[win] != NULL) { + currWin = chatWindows[win]; + update = updateMain = TRUE; + } + c = ERR; }