From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13918 invoked from network); 2 Sep 2004 15:24:13 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 2 Sep 2004 15:24:13 -0000 Received: (qmail 60480 invoked from network); 2 Sep 2004 15:24:07 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 2 Sep 2004 15:24:07 -0000 Received: (qmail 27738 invoked by alias); 2 Sep 2004 15:23:55 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20307 Received: (qmail 27728 invoked from network); 2 Sep 2004 15:23:55 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 2 Sep 2004 15:23:55 -0000 Received: (qmail 59303 invoked from network); 2 Sep 2004 15:22:55 -0000 Received: from moonbase.zanshin.com (64.84.47.139) by a.mx.sunsite.dk with SMTP; 2 Sep 2004 15:22:53 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.13.1/8.13.1) with ESMTP id i82FFggp029015 for ; Thu, 2 Sep 2004 08:15:42 -0700 Date: Thu, 2 Sep 2004 08:15:42 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-workers@sunsite.dk To: zsh-workers@sunsite.dk Subject: Re: zsh exits after delete-char-or-list and two ^Cs In-Reply-To: <200409020919.i829J0eC012233@news01.csr.com> Message-ID: References: <200409020919.i829J0eC012233@news01.csr.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.9 required=6.0 tests=BAYES_10 autolearn=no version=2.63 X-Spam-Hits: -0.9 On Thu, 2 Sep 2004, Peter Stephenson wrote: > It looks like it would be more sensible to have the test for whether a > zle widget is callable separate from the return status for zle -I. What about zle -R ? I think (but haven't applied it yet) that with this patch we have zle && echo "widgets callable" # I'm least certain of this zle -I && echo "Display invalidated and widgets callable" zle -R && echo "Display refreshed and zle active" Is that right? This covers all bases, assuming it's harmless to call zle -R even when you don't really care whether the display is refreshed. Unless one might need to know that the display has been invalidated even when widgets are not callable? I'm having a hard time coming up with that. > However, it's a bit late now. Well, no, not really -- if in fact "zle" with no arguments does correctly mean "widgets callable", then "zle -I" could continue as "zle active". Perhaps this was all a documentation problem to begin with. Sorry to nit-pick, but: > Index: Doc/Zsh/zle.yo > =================================================================== > +The returned status is zero if a zle widget can be called immediately. > +Note this is independent of whether the display has been invalidated. > +For example, if a completion widget is active a zle widget cannot be used > +and the status is one even if the display was invalidated; on the other > +hand, the status may be zero if the display was invalidated by a previous > +call to `tt(zle -I)'. Isn't it more accurate to say "the status may be nonzero even if the display was invalidated by a previous call"? With the rest of the patch as it stands, the status is never zero when completion widgets are active, even when the display was previously invalidated -- but the above seems to imply that the status might be zero in that event.