Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: tweak to `zle -I'
- X-seq: zsh-workers 17304
- From: Peter Stephenson <pws@xxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxxxxx>
- Subject: Re: PATCH: tweak to `zle -I'
- Date: Fri, 07 Jun 2002 17:22:37 +0100
- In-reply-to: "Bart Schaefer"'s message of "Fri, 07 Jun 2002 08:54:01 PDT." <Pine.LNX.4.44.0206070851360.4828-100000@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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@xxxxxxx> 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.
**********************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author