1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-04 20:40:57 +02:00

adapted 24030: work around Solaris cancelling curses key timeout

This commit is contained in:
Peter Stephenson 2007-10-30 11:03:13 +00:00
parent a6d9b3b835
commit 12a38ba4f7
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2007-10-30 Peter Stephenson <pws@csr.com>
* 24030, adapted: Src/Modules/curses.c: turning off a key timeout
on Solaris 8 seemed to need leaving and re-entering cbreak mode.
This can't be done per-window, so make this specific to Solaris
not using ncurses.
2007-10-29 Clint Adams <clint@zsh.org>
* Markus Waldeck: 24032 (tweaked): Completion/Unix/Command/_cut:

View file

@ -961,6 +961,18 @@ zccmd_timeout(const char *nam, char **args)
return 1;
}
#if defined(__sun__) && defined(__SVR4) && !defined(HAVE_USE_DEFAULT_COLORS)
/*
* On Solaris turning a timeout off seems to be problematic.
* The following fixes it. We test for Solaris without ncurses
* (the last test) to be specific; this may turn up in other older
* versions of curses, but it's difficult to test for.
*/
if (to < 0) {
nocbreak();
cbreak();
}
#endif
wtimeout(w->win, to);
return 0;
}