From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14999 invoked from network); 28 Jun 2001 18:11:06 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 28 Jun 2001 18:11:06 -0000 Received: (qmail 18966 invoked by alias); 28 Jun 2001 18:10:15 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15172 Received: (qmail 18950 invoked from network); 28 Jun 2001 18:10:14 -0000 Date: Thu, 28 Jun 2001 11:10:31 -0700 (PDT) From: Wayne Davison X-X-Sender: To: Bart Schaefer Cc: Zsh Workers Subject: Re: New behaviour for HIST_IGNORE_SPACE option In-Reply-To: <1010626062416.ZM143@candle.brasslantern.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 26 Jun 2001, Bart Schaefer wrote: > It seems to me that `print -s' should simply perform the deletion at > once, replacing the pending entry with the new one. Yes, it should. Here's a patch. ..wayne.. ---8<------8<------8<------8<---cut here--->8------>8------>8------>8--- Index: Src/hist.c --- Src/hist.c 2001/06/08 00:15:18 1.29 +++ Src/hist.c 2001/06/28 18:05:47 @@ -922,6 +922,10 @@ if (curline_in_ring) unlinkcurline(); + if (hist_ring && hist_ring->flags & HIST_TMPSTORE) { + curhist--; + freehistnode((HashNode)hist_ring); + } if (histlinect < histsiz) { he = (Histent)zcalloc(sizeof *he); ---8<------8<------8<------8<---cut here--->8------>8------>8------>8---