From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22138 invoked from network); 26 Mar 2001 08:57:25 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Mar 2001 08:57:25 -0000 Received: (qmail 25133 invoked by alias); 26 Mar 2001 08:57:19 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13767 Received: (qmail 25121 invoked from network); 26 Mar 2001 08:57:18 -0000 Date: Mon, 26 Mar 2001 10:57:18 +0200 (MET DST) Message-Id: <200103260857.KAA13279@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.dk In-reply-to: "Bart Schaefer"'s message of Sun, 25 Mar 2001 21:22:49 +0000 Subject: 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@informatik.hu-berlin.de