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

Re: Why sourcing a file is not faster than doing a loop with eval, zle -N



On Jun 19,  8:28pm, Peter Stephenson wrote:
}
} How about something like this?

If that's really OK, then I think there's a simpler patch:

diff --git a/Src/input.c b/Src/input.c
index 92abaec..73e8b26 100644
--- a/Src/input.c
+++ b/Src/input.c
@@ -144,9 +144,9 @@ shingetline(void)
     int q = queue_signal_level();
 
     p = buf;
+    winch_unblock();
+    dont_queue_signals();
     for (;;) {
-	winch_unblock();
-	dont_queue_signals();
 	do {
 	    errno = 0;
 	    c = fgetc(bshin);
@@ -176,7 +176,8 @@ shingetline(void)
 	    ll += p - buf;
 	    line[ll] = '\0';
 	    p = buf;
-	    unqueue_signals();
+	    winch_unblock();
+	    dont_queue_signals();
 	}
     }
 }

-- 
Barton E. Schaefer



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