1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-03 10:21:46 +02:00

42185: safety when removing separators in completion

This commit is contained in:
dana 2017-12-28 01:47:57 -06:00 committed by Peter Stephenson
parent 805192311f
commit eeeba19c96
2 changed files with 5 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2018-05-11 Peter Stephenson <p.stephenson@samsung.com>
* 42180: dana: Src/Zle/compcore.c: safety when removing
separators in completion.
* 42101 (tweaked): dana: Src/exec.c, Test/A06assign.ztst:
assigning shell status to array was broken.

View file

@ -1901,7 +1901,8 @@ set_comp_sep(void)
p = compwords[i] = (char *) getdata(n);
untokenize(p);
}
compcurrent = cur + 1;
/* The current position shouldn't exceed the new word count */
compcurrent = cur + 1 > i ? i : cur + 1;
compwords[i] = NULL;
}
instring = ois;