summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-08-30 14:38:26 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-08-30 14:38:26 +0000
commit4af9d9731744b496059acd32cbc98ecf2c896ea6 (patch)
treee9d159b5cb6950e2d167bc48708a873ba68fa456
parentbcd3d2ab27e808463a87188eb9bc982928c51047 (diff)
downloadzsh-4af9d9731744b496059acd32cbc98ecf2c896ea6.tar.gz
zsh-4af9d9731744b496059acd32cbc98ecf2c896ea6.tar.xz
zsh-4af9d9731744b496059acd32cbc98ecf2c896ea6.zip
23807: fix interactive completion mode
-rw-r--r--ChangeLog5
-rw-r--r--Src/Zle/complist.c10
-rw-r--r--Src/Zle/zle_misc.c2
3 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8d3c188c2..b318de850 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-08-30  Peter Stephenson  <pws@csr.com>
+
+	* 23807: Src/Zle/complist.c, Src/Zle/zle_misc.c: interactive mode
+	in completion was fairly seriously broken.
+
 2007-08-23  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* unposted: Config/version.mk,
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 64d7e50ce..0e83cb2a2 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -2542,10 +2542,20 @@ domenuselect(Hookdef dummy, Chdata dat)
                 strncpy(zlemetaline, origline, l);
                 zlemetacs = origcs;
 
+		/*
+		 * Horrible quick fix:
+		 * we shouldn't need to metafy and unmetafy
+		 * quite as much.  If we kept unmetafied through
+		 * here we could fix up setmstatus to use unmetafied
+		 * as well.  This is the only use of setmstatus which
+		 * restores the line so that should be doable.
+		 */
+		unmetafy_line();
                 if (cmd == Th(z_selfinsert))
                     selfinsert(zlenoargs);
                 else
                     selfinsertunmeta(zlenoargs);
+		metafy_line();
 
                 saveline = (char *) zhalloc(zlemetall);
                 memcpy(saveline, zlemetaline, zlemetall);
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index 48739e531..f4c32e454 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -42,6 +42,8 @@ doinsert(ZLE_STRING_T zstr, int len)
     int m = neg ? -zmult : zmult;    /* number of copies to insert */
     int count;
 
+    UNMETACHECK();
+
     iremovesuffix(c1, 0);
     invalidatelist();