summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-11-19 06:23:56 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-11-21 05:40:09 +0000
commit1f5c734f5ef4327f65e28105f83351269a6259ca (patch)
tree3d1f48d40a2dbf65ec98dd0dabb4b6587073d84c /Src
parent45c92778c64d2f9546bf5b400da879f554fc9385 (diff)
downloadzsh-1f5c734f5ef4327f65e28105f83351269a6259ca.tar.gz
zsh-1f5c734f5ef4327f65e28105f83351269a6259ca.tar.xz
zsh-1f5c734f5ef4327f65e28105f83351269a6259ca.zip
39981: Make compstate[to_end] skip suffix and hidden suffix, but not ignored suffix.
Motivated by 39930.
Diffstat (limited to 'Src')
-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;