From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2519 invoked from network); 24 Aug 2004 06:55:44 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Aug 2004 06:55:44 -0000 Received: (qmail 36500 invoked from network); 24 Aug 2004 06:55:38 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Aug 2004 06:55:38 -0000 Received: (qmail 8982 invoked by alias); 24 Aug 2004 06:55:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20282 Received: (qmail 8972 invoked from network); 24 Aug 2004 06:55:24 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 24 Aug 2004 06:55:24 -0000 Received: (qmail 35591 invoked from network); 24 Aug 2004 06:54:00 -0000 Received: from dsl3-63-249-88-2.cruzio.com (HELO binome.blorf.net) (63.249.88.2) by a.mx.sunsite.dk with SMTP; 24 Aug 2004 06:53:59 -0000 Received: by binome.blorf.net (Postfix, from userid 1000) id D2E96492; Mon, 23 Aug 2004 23:53:56 -0700 (PDT) Date: Mon, 23 Aug 2004 23:53:56 -0700 From: Wayne Davison To: zsh-workers@sunsite.dk Subject: Re: ZLE and compsys miscellaneous Message-ID: <20040824065356.GB6431@blorf.net> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="PEIAKu/WMn1b1Hv9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6+20040722i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Aug 22, 2004 at 03:37:33PM -0700, Bart Schaefer wrote: > I just noticed that down-line-or-history and up-line-or-history don't > behave as I expected when given a negative NUMERIC. They go up or down > lines within the buffer as expected, but if there is no room to move in > the buffer they use the absolute value of NUMERIC for the history motion. Yeah. This also looks like it affects the {down,up}-line-or-search functions as well. I think the upline()/downline() helper functions in zle_hist.c need to negate the "n" value, as in the attached patch. ..wayne.. --PEIAKu/WMn1b1Hv9 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="negate.patch" --- Src/Zle/zle_hist.c 29 Jul 2004 14:22:22 -0000 1.14 +++ Src/Zle/zle_hist.c 24 Aug 2004 06:51:08 -0000 @@ -92,7 +92,7 @@ upline(void) if (n < 0) { zmult = -zmult; - n = downline(); + n = -downline(); zmult = -zmult; return n; } @@ -176,7 +176,7 @@ downline(void) if (n < 0) { zmult = -zmult; - n = upline(); + n = -upline(); zmult = -zmult; return n; } --PEIAKu/WMn1b1Hv9--