reliably exit on confirmation
Until now you had to press ctrl-x twice in rapid succession to exit if an app turned on non-blocking keyboard with nodelay(true). This became particularly noticeable after the previous change to anagrams.tlv, which could no longer exit.
This commit is contained in:
parent
f72340cc37
commit
5530995188
|
@ -1343,7 +1343,11 @@ Wgetch(lua_State *L)
|
|||
color_set(COLOR_PAIR_NORMAL, NULL);
|
||||
attroff(A_BOLD|A_REVERSE);
|
||||
|
||||
if (wgetch(w) != c)
|
||||
int secondc;
|
||||
do /* just in case getch is currently non-blocking (nodelay) */
|
||||
secondc = wgetch(w);
|
||||
while(secondc == ERR);
|
||||
if (c != secondc)
|
||||
return pushintresult(0);
|
||||
|
||||
if (c == CTRL_X) {
|
||||
|
|
Loading…
Reference in New Issue