1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-02 08:51:18 +02:00

20363: Src/init.c, Src/Zle/zle_main.c

This commit is contained in:
Peter Stephenson 2004-09-13 13:04:39 +00:00
parent b12c168505
commit 1268f477b0
3 changed files with 20 additions and 5 deletions

@ -1,3 +1,8 @@
2004-09-13 Peter Stephenson <pws@csr.com>
* 20363: Src/init.c, Src/Zle/zle_main.c: exiting after 10 EOFs
with ignore_eof set was broken in zle.
2004-09-10 Peter Stephenson <pws@csr.com>
* 20348: Doc/Zsh/zle.yo, Src/Zle/zle_params.c: Rejig WIDGETSTYLE

@ -688,17 +688,27 @@ zlecore(void)
selectlocalmap(NULL);
bindk = getkeycmd();
if (bindk) {
if (!ll && isfirstln && !(zlereadflags & ZLRF_IGNOREEOF) &&
lastchar == eofchar) {
if (!ll && isfirstln && lastchar == eofchar) {
/*
* Slight hack: this relies on getkeycmd returning
* a value for the EOF character. However,
* undefined-key is fine. That's necessary because
* otherwise we can't distinguish this case from
* a ^C.
*
* The noxitct test is done in the top-level loop
* if zle is not running. As we trap EOFs at this
* level inside zle we need to mimic it here.
* If we break, the top-level loop will actually increment
* noexitct an extra time; that doesn't cause any
* problems.
*/
eofsent = 1;
break;
if (!(zlereadflags & ZLRF_IGNOREEOF) ||
++noexitct >= 10)
{
eofsent = 1;
break;
}
}
if (execzlefunc(bindk, zlenoargs))
handlefeep(zlenoargs);

@ -37,7 +37,7 @@
#include "version.h"
/**/
int noexitct = 0;
mod_export int noexitct = 0;
/* buffer for $_ and its length */