Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ZLE and compsys miscellaneous
- X-seq: zsh-workers 20282
- From: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: ZLE and compsys miscellaneous
- Date: Mon, 23 Aug 2004 23:53:56 -0700
- In-reply-to: <Pine.LNX.4.61.0408172027580.842@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Pine.LNX.4.61.0408172027580.842@xxxxxxxxxxxxxxxxxx>
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..
--- 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;
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author