mirror of git://git.code.sf.net/p/zsh/code
20387: revised algorithm for the fix in 20363.
This commit is contained in:
parent
037485c4a4
commit
2e9bbdc833
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,11 @@
|
|||
2004-09-20 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 20387: Src/init.c, Src/zle_main.c: rather than counting the EOF
|
||||
keystrokes as in 20363, pretend that we received an EOF each time
|
||||
the "use 'logout' to logout" warning is printed, and let the top-
|
||||
level loop keep the count. This way, disabling the warning (by
|
||||
rebinding that key to a "zle -N" widget) also disables counting.
|
||||
|
||||
2004-09-17 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 20378: Matthias B <msb@winterdrache.de>: Src/params.c,
|
||||
|
@ -34,7 +42,7 @@
|
|||
from zle -I and improve documentation of status from zle, zle -I,
|
||||
zle -R.
|
||||
|
||||
2004-09-08 Bart Schaefer <schaefer@zanshin.com>
|
||||
2004-09-08 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 20325: Src/exec.c, Test/E01options.ztst: fix crash when using
|
||||
the "command" builtin (as opposed to the "command" precommand
|
||||
|
|
|
@ -688,30 +688,23 @@ zlecore(void)
|
|||
selectlocalmap(NULL);
|
||||
bindk = getkeycmd();
|
||||
if (bindk) {
|
||||
if (!ll && isfirstln && lastchar == eofchar) {
|
||||
if (!ll && isfirstln && !(zlereadflags & ZLRF_IGNOREEOF) &&
|
||||
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.
|
||||
*/
|
||||
if (!(zlereadflags & ZLRF_IGNOREEOF) ||
|
||||
++noexitct >= 10)
|
||||
{
|
||||
eofsent = 1;
|
||||
break;
|
||||
}
|
||||
eofsent = 1;
|
||||
break;
|
||||
}
|
||||
if (execzlefunc(bindk, zlenoargs))
|
||||
if (execzlefunc(bindk, zlenoargs)) {
|
||||
handlefeep(zlenoargs);
|
||||
if (eofsent)
|
||||
break;
|
||||
}
|
||||
handleprefixes();
|
||||
/* for vi mode, make sure the cursor isn't somewhere illegal */
|
||||
if (invicmdmode() && cs > findbol() &&
|
||||
|
@ -908,6 +901,7 @@ execzlefunc(Thingy func, char **args)
|
|||
!ll && isfirstln && (zlereadflags & ZLRF_IGNOREEOF)) {
|
||||
showmsg((!islogin) ? "zsh: use 'exit' to exit." :
|
||||
"zsh: use 'logout' to logout.");
|
||||
eofsent = 1;
|
||||
ret = 1;
|
||||
} else {
|
||||
if(!(wflags & ZLE_KEEPSUFFIX))
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "version.h"
|
||||
|
||||
/**/
|
||||
mod_export int noexitct = 0;
|
||||
int noexitct = 0;
|
||||
|
||||
/* buffer for $_ and its length */
|
||||
|
||||
|
|
Loading…
Reference in New Issue