From: Andrey Borzenkov <arvidjaar@newmail.ru>
To: zsh-workers@sunsite.dk
Subject: Re: Prompt redrawing bug with ctrl-d
Date: Thu, 10 May 2007 10:02:03 +0400 [thread overview]
Message-ID: <200705101002.08584.arvidjaar@newmail.ru> (raw)
In-Reply-To: <200705100018.58161.arvidjaar@newmail.ru>
[-- Attachment #1: Type: text/plain, Size: 2639 bytes --]
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 #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-05-10 6:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-01 9:38 Mikael Magnusson
2007-05-09 20:18 ` Andrey Borzenkov
2007-05-10 6:02 ` Andrey Borzenkov [this message]
2007-05-10 9:38 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200705101002.08584.arvidjaar@newmail.ru \
--to=arvidjaar@newmail.ru \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).