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

PATCH: Re: Size zero allocations



Bart Schaefer wrote:

> On Mar 7, 11:09am, Sven Wischnowsky wrote:
> }
> } Bart Schaefer wrote:
> } > Press kill-whole-line at an empty prompt
> } 
> } Well, adding an empty string to the kill ring doesn't seem to make
> } much sense... maybe we should just add a `if (!ct) return;' to cut()
> } (in zle_utils.c)?
> 
> I'm in favor of this.

Well, then...

Bye
 Sven

Index: Src/Zle/zle_utils.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_utils.c,v
retrieving revision 1.5
diff -u -r1.5 zle_utils.c
--- Src/Zle/zle_utils.c	2000/08/02 18:01:51	1.5
+++ Src/Zle/zle_utils.c	2001/03/26 08:54:35
@@ -128,6 +128,9 @@
 void
 cut(int i, int ct, int dir)
 {
+    if (!ct)
+	return;
+
     if (zmod.flags & MOD_VIBUF) {
 	struct cutbuffer *b = &vibuf[zmod.vibuf];
 

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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