}
else
{
- char_u *p = ise;
+ char_u *p = ise;
+ char_u *p_space = NULL;
+
cur_end = before_cursor + (int)STRLEN(before_cursor);
while (*p != NUL)
{
int len = 0;
- if (*p == ',' && *(p+1) == ' ' && (*(p+2) == ',' || *(p+2) == NUL))
+ if (p_space)
{
- part[0] = ' ';
- len = 1;
- p++;
+ len = p - p_space - 1;
+ memcpy(part, p_space + 1, len);
+ p_space = NULL;
}
else
+ {
+ char_u *next_comma = vim_strchr((*p == ',') ? p + 1 : p, ',');
+ if (next_comma && *(next_comma + 1) == ' ')
+ p_space = next_comma;
+
len = copy_option_part(&p, part, MAXPATHL, ",");
+ }
if (len > 0 && len <= col)
{
set ise=\ ,=
call feedkeys("Sif true \<ESC>:let g:result=complete_match()\<CR>", 'tx')
call assert_equal([[8, ' ']], g:result)
+ call feedkeys("Slet a = \<ESC>:let g:result=complete_match()\<CR>", 'tx')
+ call assert_equal([[7, '=']], g:result)
+ set ise={,\ ,=
+ call feedkeys("Sif true \<ESC>:let g:result=complete_match()\<CR>", 'tx')
+ call assert_equal([[8, ' ']], g:result)
+ call feedkeys("S{ \<ESC>:let g:result=complete_match()\<CR>", 'tx')
+ call assert_equal([[1, '{']], g:result)
bw!
unlet g:result
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1389,
/**/
1388,
/**/