summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/Zle/zle_hist.c9
-rw-r--r--Src/Zle/zle_thingy.c2
3 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f697fe2fc..61250d727 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-23  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+	* unposted, yet, owing to email outage, but c.f. 21907:
+	abnormal return from insertlastword() didn't unmetafy the line;
+	add extra UNMETACHECK() to pick up problems early from zle
+	within widget.
+
 2005-10-21  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 21906: Src/prompt.c, Src/zle_refresh.c: use modified
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 80a406a8a..402887d98 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -577,13 +577,17 @@ insertlastword(char **args)
 	 * a deleted word, because that can only have come
 	 * from a non-empty line.  I think.
 	 */
-	if (!(l = bufferwords(NULL, NULL, NULL)))
+	if (!(l = bufferwords(NULL, NULL, NULL))) {
+	    unmetafy_line();
 	    return 1;
+	}
 	nwords = countlinknodes(l);
     } else {
 	/* Some stored line. */
-	if (!(he = quietgethist(evhist)) || !he->nwords)
+	if (!(he = quietgethist(evhist)) || !he->nwords) {
+	    unmetafy_line();
 	    return 1;
+	}
 	nwords = he->nwords;
     }
     if (wordpos) {
@@ -602,6 +606,7 @@ insertlastword(char **args)
 	 * has not changed, and lastinsert is still valid.
 	 */
 	lasthist = evhist;
+	unmetafy_line();
 	return 1;
     }
     /*
diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c
index 56e0c51cb..b24e686b8 100644
--- a/Src/Zle/zle_thingy.c
+++ b/Src/Zle/zle_thingy.c
@@ -358,6 +358,8 @@ bin_zle(char *name, char **args, Options ops, UNUSED(int func))
     struct opn const *op, *opp;
     int n;
 
+    UNMETACHECK();
+
     /* select operation and ensure no clashing arguments */
     for(op = opns; op->o && !OPT_ISSET(ops,STOUC(op->o)); op++) ;
     if(op->o)