zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@csr.com>
To: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: PATCH: tweak to `zle -I'
Date: Fri, 07 Jun 2002 17:22:37 +0100	[thread overview]
Message-ID: <19399.1023466957@csr.com> (raw)
In-Reply-To: "Bart Schaefer"'s message of "Fri, 07 Jun 2002 08:54:01 PDT." <Pine.LNX.4.44.0206070851360.4828-100000@ns1.sodaware.com>

Bart Schaefer wrote:
> > +The status is zero if the current zle display was invalidated, else one.
> 
> What's the status on the second and subsequent calls?  (I suppose I could
> try it, but I don't have a current build yet.)
> 
> I think the status should be 1 if the display *would have been* invalided,
> even if it wasn't because it already has been, if you see what I mean.

Do you mean 0?  It currently returns 1 on subsequent calls.  I suppose
you mean 0 should indicate zle was active, i.e as follows.

Index: Src/Zle/zle_thingy.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_thingy.c,v
retrieving revision 1.7
diff -u -r1.7 zle_thingy.c
--- Src/Zle/zle_thingy.c	7 Jun 2002 10:57:25 -0000	1.7
+++ Src/Zle/zle_thingy.c	7 Jun 2002 16:18:23 -0000
@@ -672,8 +672,9 @@
 static int
 bin_zle_invalidate(char *name, char **args, char *ops, char func)
 {
-    if (zleactive && !trashedzle) {
-	trashzle();
+    if (zleactive) {
+	if (!trashedzle)
+	    trashzle();
 	return 0;
     } else
 	return 1;
Index: Doc/Zsh/zle.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/zle.yo,v
retrieving revision 1.20
diff -u -r1.20 zle.yo
--- Doc/Zsh/zle.yo	7 Jun 2002 10:57:25 -0000	1.20
+++ Doc/Zsh/zle.yo	7 Jun 2002 16:20:41 -0000
@@ -498,7 +498,9 @@
 Note that there are normally better ways of manipulating the display from
 within zle widgets; see, for example, `tt(zle -R)' above.
 
-The status is zero if the current zle display was invalidated, else one.
+The status is zero if zle is active and the current zle display has
+been invalidated (even if this was by a previous call to `tt(zle -I)'),
+else one.
 )
 item(var(widget) tt([ -n) var(num) tt(]) tt([ -N ]) var(args) ...)(
 Invoke the specified widget.  This can only be done when ZLE is

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


  reply	other threads:[~2002-06-07 16:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-07 10:50 Peter Stephenson
2002-06-07 15:54 ` Bart Schaefer
2002-06-07 16:22   ` Peter Stephenson [this message]
2002-06-07 16:44     ` Bart Schaefer

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=19399.1023466957@csr.com \
    --to=pws@csr.com \
    --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).