On Thursday 10 May 2007, Andrey Borzenkov wrote: > On Tuesday 01 May 2007, Mikael Magnusson wrote: > > Hello, noticed this a while ago. > > > > % zsh -f > > % setopt ignoreeof > > % <ctrl-d> > > > > zsh: use 'exit' to exit. > > > > The prompt is now invisible. > > message is displayed using showmsg() that sets "clearflag" which should > tell zrefresh() to not clear until end of screen (to preserve message). > Unfortunately this flag has side effect that zrefresh() does not redisplay > prompt either and skips over it. > > Unfortunately I do not see any easy way short of adding yet another flag. I > have started git cvsimport to try bisect; have no idea how long it takes. OK here is the attempt to fix it. It is using use_exit_printed as flag and moves its resetting a bit later, so flag is available in preprompt (where prompt was overwritten in case promptsp). If there are no objections I'll commit it. P.S. git cvsimport still runs for over 9 hours now :) Index: Src/init.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/init.c,v retrieving revision 1.72 diff -u -p -r1.72 init.c --- Src/init.c 8 Nov 2006 17:43:32 -0000 1.72 +++ Src/init.c 10 May 2007 05:58:39 -0000 @@ -123,6 +123,7 @@ loop(int toplevel, int justonce) errflag = 0; } } + use_exit_printed = 0; intr(); /* interrupts on */ lexinit(); /* initialize lexical state */ if (!(prog = parse_event())) { /* if we couldn't parse a list */ @@ -1335,7 +1336,6 @@ zsh_main(UNUSED(int argc), char **argv) init_misc(); for (;;) { - use_exit_printed = 0; /* * See if we can free up some of jobtab. * We only do this at top level, because if we are Index: Src/utils.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/utils.c,v retrieving revision 1.163 diff -u -p -r1.163 utils.c --- Src/utils.c 26 Apr 2007 09:27:44 -0000 1.163 +++ Src/utils.c 10 May 2007 05:58:40 -0000 @@ -1156,7 +1156,7 @@ preprompt(void) int period = getiparam("PERIOD"); int mailcheck = getiparam("MAILCHECK"); - if (isset(PROMPTSP) && isset(PROMPTCR)) { + if (isset(PROMPTSP) && isset(PROMPTCR) && !use_exit_printed) { /* The PROMPT_SP heuristic will move the prompt down to a new line * if there was any dangling output on the line (assuming the terminal * has automatic margins, but we try even if hasam isn't set). */
Attachment:
pgpzuQs3W2cUc.pgp
Description: PGP signature