summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/Modules/curses.c12
2 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c71eda56..cf9096faa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:
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;
}