about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/complist.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index 0529077d3..48c216cf8 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -1122,21 +1122,12 @@ compprintlist(int showall)
 		    n = lastn;
 		    nl = lastnl;
 		    lastused = 1;
+		    pnl = 0;
 		} else
 		    p = g->matches;
 
 		for (; (m = *p); p++) {
 		    if (m->disp && (m->flags & CMF_DISPLINE)) {
-			if (!lasttype && ml >= mlbeg) {
-			    lasttype = 2;
-			    lastg = g;
-			    lastbeg = mlbeg;
-			    lastml = ml;
-			    lastp = p;
-			    lastn = n;
-			    lastnl = nl;
-			    lastused = 1;
-			}
 			if (pnl) {
 			    if (dolistnl(ml) && compprintnl(ml))
 				goto end;
@@ -1148,6 +1139,16 @@ compprintlist(int showall)
 				    tcout(TCCLEAREOD);
 			    }
 			}
+			if (!lasttype && ml >= mlbeg) {
+			    lasttype = 2;
+			    lastg = g;
+			    lastbeg = mlbeg;
+			    lastml = ml;
+			    lastp = p;
+			    lastn = n;
+			    lastnl = nl;
+			    lastused = 1;
+			}
 			if (mfirstl < 0)
 			    mfirstl = ml;
 			if (dolist(ml))