about summary refs log tree commit diff
path: root/Src/Zle/complist.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/complist.c')
-rw-r--r--Src/Zle/complist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/complist.c b/Src/Zle/complist.c
index c1481612b..a5cabe878 100644
--- a/Src/Zle/complist.c
+++ b/Src/Zle/complist.c
@@ -489,7 +489,7 @@ doiscol(Listcols c, int pos)
 	    /* insert e in sendpos */
 	    for (i = curissend; sendpos[i] <= e; ++i)
 		;
-	    for (j = i + 1; j < MAX_POS; ++j)
+	    for (j = MAX_POS - 1; j > i; --j)
 		sendpos[j] = sendpos[j-1];
 	    sendpos[i] = e;