about summary refs log tree commit diff
path: root/Src/Zle/complete.c
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-07-04 09:29:20 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-07-04 09:29:20 +0000
commitc2dd10edc9136f11746b7cbedf5801106a2e0541 (patch)
tree150e264f5a7f5c1c7e25d5ef82dc3c0a86357a6b /Src/Zle/complete.c
parentd98faffcaf274db165cde607f546d62a30853327 (diff)
downloadzsh-c2dd10edc9136f11746b7cbedf5801106a2e0541.tar.gz
zsh-c2dd10edc9136f11746b7cbedf5801106a2e0541.tar.xz
zsh-c2dd10edc9136f11746b7cbedf5801106a2e0541.zip
in menu selection, use copies of comp{pre,suf}fix to make sure they exist; fix display problem with non-empty iprefix (17403)
Diffstat (limited to 'Src/Zle/complete.c')
-rw-r--r--Src/Zle/complete.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c
index e1051c30c..ef029ddcb 100644
--- a/Src/Zle/complete.c
+++ b/Src/Zle/complete.c
@@ -46,6 +46,8 @@ char **compwords,
      **compredirs,
      *compprefix,
      *compsuffix,
+     *complastprefix,
+     *complastsuffix,
      *compisuffix,
      *compqiprefix,
      *compqisuffix,
@@ -1405,6 +1407,8 @@ setup_(Module m)
 	compexact = compexactstr = comppatmatch = comppatinsert =
 	complastprompt = comptoend = compoldlist = compoldins =
 	compvared = compqstack = NULL;
+    complastprefix = ztrdup("");
+    complastsuffix = ztrdup("");
     complistmax = 0;
     hascompmod = 1;
 
@@ -1458,6 +1462,8 @@ finish_(Module m)
 	freearray(compredirs);
     zsfree(compprefix);
     zsfree(compsuffix);
+    zsfree(complastprefix);
+    zsfree(complastsuffix);
     zsfree(compiprefix);
     zsfree(compisuffix);
     zsfree(compqiprefix);