From 12a38ba4f725e423e9f5ab4c87af7fc03663b90e Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 30 Oct 2007 11:03:13 +0000 Subject: adapted 24030: work around Solaris cancelling curses key timeout --- Src/Modules/curses.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Src/Modules') diff --git a/Src/Modules/curses.c b/Src/Modules/curses.c index a1801e913..ae8859726 100644 --- a/Src/Modules/curses.c +++ b/Src/Modules/curses.c @@ -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; } -- cgit 1.4.1