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

Re: Another completion-time screen refresh bug



Tracked down to Src/Zle/compresult.c:printlist():2027-2028
This seems wrong - it's a near copy of compprintlist() (or the
other way around) but it doesn't necessarily make sense here.
Printing the new line only makes sense _after_ printing other
stuff which is OK in compprintlist() where there are possibly
multiple sets of lists & explanations to print.  Don't know if
this is the case here.

I don't (want to) understand this section.  I'm thinking that
those lines should be ripped out though maybe it should be
something like the following.  Anybody (besides Sven) looked
through this code before?

Regards,
Geoff

--- Src/Zle/compresult.c	2004-07-13 04:31:41.000000000 +1000
+++ Src/Zle/compresult.c	2004-07-15 15:40:41.000000000 +1000
@@ -1855,8 +1855,7 @@
 	if (tccan(TCCLEAREOD))
 	    tcout(TCCLEAREOD);
     }
-    g = amatches;
-    while (g) {
+    for (g = amatches; g; g = g->next) {
 	char **pp = g->ylist;
 
 	if ((e = g->expls)) {
@@ -2023,10 +2022,10 @@
 			    p = skipnolist(p + 1, showall);
 		}
 	    }
-	}
+	} else
+	    continue;
 	if (g->lcount || (showall && g->mcount))
 	    pnl = 1;
-	g = g->next;
     }
     lastlistlen = 0;
     if (clearflag) {



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