about summary refs log tree commit diff
path: root/Src/Zle/zle_hist.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-10-23 17:42:56 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-10-23 17:42:56 +0000
commit05b6a233622031136304bbb3dfe7012d29cae7f1 (patch)
treeb0a388023f38da12580d3e438e4d99116354c391 /Src/Zle/zle_hist.c
parente3856ef52e653da7561dd3873823601b22485fd4 (diff)
downloadzsh-05b6a233622031136304bbb3dfe7012d29cae7f1.tar.gz
zsh-05b6a233622031136304bbb3dfe7012d29cae7f1.tar.xz
zsh-05b6a233622031136304bbb3dfe7012d29cae7f1.zip
not yet posted; zle line screwed up on bad return from insertlastword()
Diffstat (limited to 'Src/Zle/zle_hist.c')
-rw-r--r--Src/Zle/zle_hist.c9
1 files changed, 7 insertions, 2 deletions
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;
     }
     /*