zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: Interrupt after first tabbing into a menu select clears prompt
Date: Fri, 15 Jan 2016 12:43:04 +0000	[thread overview]
Message-ID: <20160115124304.658629e2@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CA+mw5u2+naX6r5FqK-j12ZDa3acRN0LvQrJq0fS2cJ+R386veA@mail.gmail.com>

On Fri, 15 Jan 2016 19:46:25 +0800
Leo Mao <leomao@users.sourceforge.net> wrote:
> I also encounter this regression. Is there any news about this?
> 
> I can confirm that this problem only occurs when I interrupt right after
> tabbing into the list.

It looks like this ought to help with the issue in question.
There's probably a race if you hit ^C again very quickly.

Possibly zrefresh() ought to save, reset, and finally restore the
errflag, which could help in other places.  Either that, or it
should simply refuse to redraw until the error condition is reset.

pws

diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 29aaee8..0ccb885 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -2584,6 +2584,12 @@ domenuselect(Hookdef dummy, Chdata dat)
     	if (!do_last_key) {
 	    zmult = 1;
 	    cmd = getkeycmd();
+	    /*
+	     * On interrupt, we'll exit due to cmd being empty.
+	     * Don't propagate the interrupt any further, which
+	     * can screw up redrawing.
+	     */
+	    errflag &= ~ERRFLAG_INT;
 	    if (mtab_been_reallocated) {
 		do_last_key = 1;
 		continue;


  reply	other threads:[~2016-01-15 12:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15 11:46 Leo Mao
2016-01-15 12:43 ` Peter Stephenson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-12-27  5:48 Philip Sequeira

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=20160115124304.658629e2@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /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).