Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham
	autolearn_force=no version=3.4.0
X-AuditID: cbfec7f5-f79b16d000005389-0c-5698e95b64bf
Date: Fri, 15 Jan 2016 12:43:04 +0000
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: Interrupt after first tabbing into a menu select clears prompt
Message-id: <20160115124304.658629e2@pwslap01u.europe.root.pri>
In-reply-to:
 <CA+mw5u2+naX6r5FqK-j12ZDa3acRN0LvQrJq0fS2cJ+R386veA@mail.gmail.com>
References: <CA+mw5u2+naX6r5FqK-j12ZDa3acRN0LvQrJq0fS2cJ+R386veA@mail.gmail.com>
Organization: Samsung Cambridge Solution Centre
X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu)
MIME-version: 1.0
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7bit
X-Brightmail-Tracker:
 H4sIAAAAAAAAA+NgFjrPLMWRmVeSWpSXmKPExsVy+t/xa7rRL2eEGfy8wGVxsPkhkwOjx6qD
	H5gCGKO4bFJSczLLUov07RK4MhqmPWQr+MhRMaPzH1MD4wu2LkZODgkBE4n7j7rYIWwxiQv3
	1gPFuTiEBJYySjQuW8UMkhASmMEk8WRaGkTiHKPE4u9fWSASZxkl9r2xALFZBFQl7rffBJvK
	JmAoMXXTbEYQW0RAXOLs2vNg9cIC3hK9VxeA2bwC9hKrtzwG28wpECyxe9omVoiZARL9q9eB
	1fAL6Etc/fuJCeI6e4mZV84wQvQKSvyYfA+shllAS2LztiZWCFteYvOat1BHq0vcuLubfQKj
	8CwkLbOQtMxC0rKAkXkVo2hqaXJBcVJ6rpFecWJucWleul5yfu4mRkgwf93BuPSY1SFGAQ5G
	JR7eH5wzwoRYE8uKK3MPMUpwMCuJ8PLeAQrxpiRWVqUW5ccXleakFh9ilOZgURLnnbnrfYiQ
	QHpiSWp2ampBahFMlomDU6qB8cCczeXOdStavm9WZKs/dfTZAu9Lsx/dzDrx7MmjHcv4F+24
	oi96pCZhq/XyVX3HZyqpzru65VbgQdbbD09HWGx18M/LFdwXpXQ7zbrk4UXG+9ovonkXsG20
	fO8iPG2pVM/lJxYKkxobXYpm/NadsX3VhsCOqjVfrdK5A71lJyW8+XhD36Ga6akSS3FGoqEW
	c1FxIgDNXJa1YgIAAA==
X-Seq: zsh-workers 37643

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;

