mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-23 17:01:05 +02:00
Fix crash on re-entry to loop() from preprompt().
This commit is contained in:
parent
b70ec86efe
commit
135eebde60
2 changed files with 11 additions and 1 deletions
|
@ -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>
|
2001-08-24 Sven Wischnowsky <wischnow@zsh.org>
|
||||||
|
|
||||||
* 15705: Src/Zle/complete.c: test if hash table pointer is NULL
|
* 15705: Src/Zle/complete.c: test if hash table pointer is NULL
|
||||||
|
|
|
@ -107,6 +107,8 @@ loop(int toplevel, int justonce)
|
||||||
pushheap();
|
pushheap();
|
||||||
for (;;) {
|
for (;;) {
|
||||||
freeheap();
|
freeheap();
|
||||||
|
if (stophist == 3) /* re-entry via preprompt() */
|
||||||
|
hend(NULL);
|
||||||
hbegin(1); /* init history mech */
|
hbegin(1); /* init history mech */
|
||||||
if (isset(SHINSTDIN)) {
|
if (isset(SHINSTDIN)) {
|
||||||
setblock_stdin();
|
setblock_stdin();
|
||||||
|
@ -114,7 +116,10 @@ loop(int toplevel, int justonce)
|
||||||
int hstop = stophist;
|
int hstop = stophist;
|
||||||
stophist = 3;
|
stophist = 3;
|
||||||
preprompt();
|
preprompt();
|
||||||
stophist = hstop;
|
if (stophist != 3)
|
||||||
|
hbegin(1);
|
||||||
|
else
|
||||||
|
stophist = hstop;
|
||||||
errflag = 0;
|
errflag = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue