From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9201 invoked from network); 16 Jun 1999 20:47:18 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 16 Jun 1999 20:47:18 -0000 Received: (qmail 29190 invoked by alias); 16 Jun 1999 20:47:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6681 Received: (qmail 29166 invoked from network); 16 Jun 1999 20:46:59 -0000 Date: Wed, 16 Jun 1999 13:46:56 -0700 (PDT) From: Wayne Davison To: zsh-workers@sunsite.auc.dk Subject: PATCH: pws-22: history -r fix In-Reply-To: <990616081913.ZM29592@candle.brasslantern.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 16 Jun 1999, Bart Schaefer wrote: > On a possibly-related note, "history -r" seems to be broken now Yes, the start-of-loop check was wrong. Here's a patch: Index: Src/builtin.c --- zsh-3.1.5-pws-22/Src/builtin.c Mon Jun 14 09:14:30 1999 +++ ./Src/builtin.c Wed Jun 16 13:37:17 1999 @@ -1349,7 +1349,7 @@ fclistdone = 1; ent = gethistent(first, first < last? GETHIST_DOWNWARD : GETHIST_UPWARD); - if (!ent || ent->histnum < first || ent->histnum > last) { + if (!ent || (first < last? ent->histnum > last : ent->histnum < last)) { if (first == last) zwarnnam("fc", "no such event: %d", NULL, first); else ..wayne..