Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: guess what this is about



On Mon, 29 Oct 2007 10:30:14 +0000
Peter Stephenson <pws@xxxxxxx> wrote:
> I'm also having problems with borders and timeouts on the same system
> which I may look at at some point.

The problem with timeouts on Solaris 8 (which is rather antiquated anyway)
was they didn't get turned off.  This fixes it, but it's a bit nasty, and
also it may mess up the settings in other windows, since the timeout is
supposed to be window-specific, so I'd rather not have to do it unless it's
absolutely necessary.  In particularly it would be nice to test, so I'll
leave it out for a while.

It's really time I did something else.

Index: Src/Modules/curses.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/curses.c,v
retrieving revision 1.30
diff -u -r1.30 curses.c
--- Src/Modules/curses.c	29 Oct 2007 11:38:17 -0000	1.30
+++ Src/Modules/curses.c	29 Oct 2007 12:05:11 -0000
@@ -961,6 +961,15 @@
 	return 1;
     }
 
+    if (to < 0) {
+	/*
+	 * On Solaris turning a timeout off seems to be problematic.
+	 * The following fixes it.  It would nice to #ifdef, but
+	 * it's a palaver to test for.
+	 */
+	nocbreak();
+	cbreak();
+    }
     wtimeout(w->win, to);
     return 0;
 }


-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author