mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
vim-patch:7.4.741 #4121
Problem: When using += with ":set" a trailing comma is not recognized.
(Issue 365)
Solution: Don't add a second comma. Add a test. (partly by Christian
Brabandt)
a7b7b1cef9
This commit is contained in:

committed by
Justin M. Keyes

parent
99067b7e56
commit
59ef994f8f
@@ -1673,6 +1673,11 @@ do_set (
|
||||
&& *newval != NUL);
|
||||
if (adding) {
|
||||
i = (int)STRLEN(origval);
|
||||
// Strip a trailing comma, would get 2.
|
||||
if (comma && i > 1 && origval[i - 1] == ','
|
||||
&& origval[i - 2] != '\\') {
|
||||
--i;
|
||||
}
|
||||
memmove(newval + i + comma, newval,
|
||||
STRLEN(newval) + 1);
|
||||
memmove(newval, origval, (size_t)i);
|
||||
|
@@ -421,7 +421,7 @@ static int included_patches[] = {
|
||||
// 744 NA
|
||||
// 743,
|
||||
// 742,
|
||||
// 741,
|
||||
741,
|
||||
// 740,
|
||||
739,
|
||||
// 738 NA
|
||||
|
Reference in New Issue
Block a user