mirror of
https://github.com/vim/vim.git
synced 2025-10-10 06:24:10 -04:00
patch 7.4.915
Problem: When removing from 'path' and then adding, a comma may go missing. (Malcolm Rowe) Solution: Fix the check for P_ONECOMMA. (closes #471)
This commit is contained in:
@@ -4883,7 +4883,8 @@ do_set(arg, opt_flags)
|
||||
{
|
||||
i = (int)STRLEN(origval);
|
||||
/* strip a trailing comma, would get 2 */
|
||||
if (comma && (flags & P_ONECOMMA) && i > 1
|
||||
if (comma && i > 1
|
||||
&& (flags & P_ONECOMMA) == P_ONECOMMA
|
||||
&& origval[i - 1] == ','
|
||||
&& origval[i - 2] != '\\')
|
||||
i--;
|
||||
|
@@ -10,6 +10,12 @@ STARTTEST
|
||||
:endtry
|
||||
:buf 1
|
||||
:$put =caught
|
||||
:"
|
||||
:" Test that changing 'path' keeps two commas.
|
||||
:set path=foo,,bar
|
||||
:set path-=bar
|
||||
:set path+=bar
|
||||
:$put =&path
|
||||
:/^result/,$w! test.out
|
||||
:qa!
|
||||
ENDTEST
|
||||
|
@@ -1,2 +1,3 @@
|
||||
result
|
||||
ok
|
||||
foo,,bar
|
||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
915,
|
||||
/**/
|
||||
914,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user