diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2007-10-30 11:03:13 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2007-10-30 11:03:13 +0000 |
commit | 12a38ba4f725e423e9f5ab4c87af7fc03663b90e (patch) | |
tree | 830cf0af50dbe664c25a5651718e3a6a25bae665 /Src/Modules | |
parent | a6d9b3b83556d96d6c58b0163722d3582d8446e5 (diff) | |
download | zsh-12a38ba4f725e423e9f5ab4c87af7fc03663b90e.tar.gz zsh-12a38ba4f725e423e9f5ab4c87af7fc03663b90e.tar.xz zsh-12a38ba4f725e423e9f5ab4c87af7fc03663b90e.zip |
adapted 24030: work around Solaris cancelling curses key timeout
Diffstat (limited to 'Src/Modules')
-rw-r--r-- | Src/Modules/curses.c | 12 |
1 files changed, 12 insertions, 0 deletions
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; } |