Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Removing aliases from history, 2015 style
On Fri, 27 Mar 2015 08:25:15 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Mar 27, 10:06am, Peter Stephenson wrote:
> } Subject: Re: PATCH: Removing aliases from history, 2015 style
> }
> } it looks like I've managed to make that work less well when
> } interrupted. If I ^C during the history read I get
> }
> } ^CWarning: backing up wrong character.
>
> That's probably an unintended side-effect of 34543. Try this:
>
> diff --git a/Src/lex.c b/Src/lex.c
> index 6d0079c..4d8355b 100644
> --- a/Src/lex.c
> +++ b/Src/lex.c
> @@ -513,7 +513,7 @@ cmd_or_math(int cs_type)
> /* else unsuccessful: unget the whole thing */
> hungetc(c);
> lexstop = 0;
> - while (lexbuf.len > oldlen && !errflag) {
> + while (lexbuf.len > oldlen && !(errflag & ERRFLAG_ERROR)) {
> lexbuf.len--;
> hungetc(itok(*--lexbuf.ptr) ?
> ztokens[*lexbuf.ptr - Pound] : *lexbuf.ptr);
That doesn't seem to make a major difference --- I can't rule out the
possibility it perturbs the error messages a bit but they look similar
to the naked eye.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author