about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Doc/Zsh/zle.yo4
-rw-r--r--Src/Zle/zle_thingy.c5
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b27065bb..1669ca349 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2002-06-07  Peter Stephenson  <pws@csr.com>
 
+	* 17304: Src/Zle/zle_main.c, Doc/Zsh/zle.yo: (suggested by Bart)
+	tweak the tweaked tweak in 17301 so that zle -I returns status
+	0 if zle display was successfully invalidated even if by a
+	previous cal to zle -I (user doesn't care). 
+
 	* 17299: Src/builtin.c, Src/exec.c, Src/init.c, Src/parse.c,
 	Src/text.c, Src/zsh.h: Instead of freeing Eprogs in one go
 	at the top level, use reference counts.
diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo
index 28e49130a..9a15530b9 100644
--- a/Doc/Zsh/zle.yo
+++ b/Doc/Zsh/zle.yo
@@ -498,7 +498,9 @@ to minimise disruption.
 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
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c
index 26fc49906..2946ea209 100644
--- a/Src/Zle/zle_thingy.c
+++ b/Src/Zle/zle_thingy.c
@@ -672,8 +672,9 @@ bin_zle_call(char *name, char **args, char *ops, char func)
 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;