about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Src/Zle/compresult.c4
-rw-r--r--Src/Zle/zle_misc.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index acb3b4845..4a8a7af49 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1827,9 +1827,9 @@ list_matches(Hookdef dummy, void *dummy2)
 mod_export int
 invalidate_list(void)
 {
-    if (showinglist == -2)
-	listmatches();
     if (validlist) {
+	if (showinglist == -2)
+	    zrefresh();
 	freematches(lastmatches);
 	lastmatches = NULL;
 	hasoldlist = 0;
diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c
index 3e306da8a..eec325192 100644
--- a/Src/Zle/zle_misc.c
+++ b/Src/Zle/zle_misc.c
@@ -640,7 +640,8 @@ Thingy
 executenamedcommand(char *prmt)
 {
     Thingy cmd;
-    int len, l = strlen(prmt), ols = listshown, feep = 0, listed = 0, curlist = 0;
+    int len, l = strlen(prmt), feep = 0, listed = 0, curlist = 0;
+    int ols = (listshown && validlist);
     char *ptr;
     char *okeymap = curkeymapname;