1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-17 15:01:40 +02:00

Fix crash on re-entry to loop() from preprompt().

This commit is contained in:
Bart Schaefer 2001-08-25 16:44:15 +00:00
parent b70ec86efe
commit 135eebde60
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2001-08-25 Bart Schaefer <schaefer@zsh.org>
* 15707: Src/init.c: Fix history crash caused by re-entering
loop() when the `precmd' shell function uses `source' or `.'.
2001-08-24 Sven Wischnowsky <wischnow@zsh.org>
* 15705: Src/Zle/complete.c: test if hash table pointer is NULL

View file

@ -107,6 +107,8 @@ loop(int toplevel, int justonce)
pushheap();
for (;;) {
freeheap();
if (stophist == 3) /* re-entry via preprompt() */
hend(NULL);
hbegin(1); /* init history mech */
if (isset(SHINSTDIN)) {
setblock_stdin();
@ -114,7 +116,10 @@ loop(int toplevel, int justonce)
int hstop = stophist;
stophist = 3;
preprompt();
stophist = hstop;
if (stophist != 3)
hbegin(1);
else
stophist = hstop;
errflag = 0;
}
}