Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Removing aliases from history, 2015 style



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);



Messages sorted by: Reverse Date, Date, Thread, Author