Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: BUG: listmatches called with bogus list



Tanaka Akira wrote:

> `echo =zsh<TAB>-<M-x>expand-word<CR>' shows `BUG: listmatches called
> with bogus list'.

Time for a bit of defensive programming, I think.

Avoiding the error message was simple but finding out how to avoid the 
display bug that showed up after that...

Bye
 Sven

diff -ru ../z.old/Src/Zle/compresult.c Src/Zle/compresult.c
--- ../z.old/Src/Zle/compresult.c	Wed Jan  5 16:41:42 2000
+++ Src/Zle/compresult.c	Thu Jan  6 10:24:36 2000
@@ -1827,9 +1827,9 @@
 mod_export int
 invalidate_list(void)
 {
-    if (showinglist == -2)
-	listmatches();
     if (validlist) {
+	if (showinglist == -2)
+	    zrefresh();
 	freematches(lastmatches);
 	lastmatches = NULL;
 	hasoldlist = 0;
diff -ru ../z.old/Src/Zle/zle_misc.c Src/Zle/zle_misc.c
--- ../z.old/Src/Zle/zle_misc.c	Wed Jan  5 16:41:43 2000
+++ Src/Zle/zle_misc.c	Thu Jan  6 09:51:28 2000
@@ -640,7 +640,8 @@
 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;
 

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author