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/compresult.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/Zle/compresult.c b/Src/Zle/compresult.c
index b7ec18f6d..05799399d 100644
--- a/Src/Zle/compresult.c
+++ b/Src/Zle/compresult.c
@@ -1174,6 +1174,10 @@ do_single(Cmatch m)
 	zlemetacs = minfo.end;
 	if (zlemetacs + m->qisl == lastend)
 	    zlemetacs += minfo.insc;
+
+	/* Advance CURSOR past compadd -s/-S suffixes. */
+	zlemetacs += strlen(psuf);
+	zlemetacs += m->suf ? strlen(m->suf) : 0;
     }
     {
 	Cmatch *om = minfo.cur;