about summary refs log tree commit diff
path: root/Src/Zle/compcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/compcore.c')
-rw-r--r--Src/Zle/compcore.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c
index 425dcf464..dc1abc8cf 100644
--- a/Src/Zle/compcore.c
+++ b/Src/Zle/compcore.c
@@ -1696,6 +1696,7 @@ addmatches(Cadata dat, char **argv)
 		    }
 		    pline = matchparts;
 		    lpre += ml;
+		    llpl -= ml;
 		    bcp = ml;
 		    bpadd = strlen(s) - ml;
 		} else {
@@ -1721,6 +1722,7 @@ addmatches(Cadata dat, char **argv)
 		    }
 		    sline = revert_cline(matchparts);
 		    lsuf[llsl - ml] = '\0';
+		    llsl -= ml;
 		    bcs = ml;
 		    bsadd = strlen(s) - ml;
 		} else {