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

Recent curses module changes and Re: TRAPALRM / TMOUT oddity



On May 26, 10:14am, Peter Stephenson wrote:
}
} +	    if (selret < 0 && (errflag || retflag || breaks || exit_pending))
}  		break;

I suppose that means the following would be advisable?  Or is it perhaps
going too far?

Index: Src/Modules/curses.c
===================================================================
diff -c -r1.5 curses.c
--- Src/Modules/curses.c	6 May 2011 15:29:06 -0000	1.5
+++ Src/Modules/curses.c	27 May 2011 01:08:59 -0000
@@ -1106,7 +1106,7 @@
 
 #ifdef HAVE_WGET_WCH
     while ((ret = wget_wch(w->win, &wi)) == ERR) {
-	if (errno != EINTR)
+	if (errno != EINTR || errflag || retflag || breaks || exit_pending)
 	    break;
     }
     switch (ret) {
@@ -1132,7 +1132,7 @@
     }
 #else
     while ((ci = wgetch(w->win)) == ERR) {
-	if (errno != EINTR)
+	if (errno != EINTR || errflag || retflag || breaks || exit_pending)
 	    return 1;
     }
     if (ci >= 256) {



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