mirror of
https://github.com/zsh-users/zsh
synced 2024-07-21 18:24:18 +00:00
18941: history wrong after parse error during alias expansion
This commit is contained in:
parent
b38f3c9a17
commit
e65a811520
|
@ -1,5 +1,8 @@
|
||||||
2003-08-11 Peter Stephenson <pws@csr.com>
|
2003-08-11 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 18941: Src/hist.c, Src/input.c: Alias text could end up in
|
||||||
|
history after a parsing error during alias expansion.
|
||||||
|
|
||||||
* 18938: Src/lex.c, Src/Math.c, Src/Zle/zle_main.c,
|
* 18938: Src/lex.c, Src/Math.c, Src/Zle/zle_main.c,
|
||||||
Src/Zle/compcore.c: Mark some data symbols for export, shutting
|
Src/Zle/compcore.c: Mark some data symbols for export, shutting
|
||||||
up Cygwin's dllwrap. Note that c from zle_main.c is not marked
|
up Cygwin's dllwrap. Note that c from zle_main.c is not marked
|
||||||
|
|
|
@ -290,6 +290,8 @@ safeinungetc(int c)
|
||||||
void
|
void
|
||||||
herrflush(void)
|
herrflush(void)
|
||||||
{
|
{
|
||||||
|
inpopalias();
|
||||||
|
|
||||||
while (!lexstop && inbufct && !strin)
|
while (!lexstop && inbufct && !strin)
|
||||||
hwaddc(ingetc());
|
hwaddc(ingetc());
|
||||||
}
|
}
|
||||||
|
|
14
Src/input.c
14
Src/input.c
|
@ -549,3 +549,17 @@ inpop(void)
|
||||||
inpoptop();
|
inpoptop();
|
||||||
} while (remcont);
|
} while (remcont);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Expunge any aliases from the input stack; they shouldn't appear
|
||||||
|
* in the history and need to be flushed explicitly when we encounter
|
||||||
|
* an error.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**/
|
||||||
|
void
|
||||||
|
inpopalias(void)
|
||||||
|
{
|
||||||
|
while (inbufflags & INP_ALIAS)
|
||||||
|
inpoptop();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue