From 8a379aacd758056a89dfbd5e1a4d702ec57e9138 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 10 May 2016 21:24:15 -0400 Subject: vim-patch:7.4.1017 Problem: When there is a backslash in an option ":set -=" doesn't work. Solution: Handle a backslash better. (Jacob Niehus) Add a new test, merge in old test. https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b --- src/nvim/option.c | 19 +++++++++++-------- src/nvim/version.c | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/nvim/option.c b/src/nvim/option.c index 2f22c245dd..45ebb4fa4c 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1639,18 +1639,21 @@ do_set ( && STRNCMP(s, newval, i) == 0 && (!(flags & P_COMMA) || s[i] == ',' - || s[i] == NUL)) + || s[i] == NUL)) { break; - /* Count backslashes. Only a comma with an - * even number of backslashes before it is - * recognized as a separator */ - if (s > origval && s[-1] == '\\') - ++bs; - else + } + // Count backslashes. Only a comma with an even number of + // backslashes or a single backslash preceded by a comma + // before it is recognized as a separator + if ((s > origval + 1 && s[-1] == '\\' && s[-2] != ',') + || (s == origval + 1 && s[-1] == '\\')) { + bs++; + } else { bs = 0; + } } - /* do not add if already there */ + // do not add if already there if ((adding || prepending) && *s) { prepending = FALSE; adding = FALSE; diff --git a/src/nvim/version.c b/src/nvim/version.c index 82a15f9833..b6b55964f3 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -667,7 +667,7 @@ static int included_patches[] = { // 1020 NA // 1019 NA // 1018, - // 1017, + 1017, // 1016 NA 1015, // 1014 NA -- cgit From d5168064bfe8da23f713eb7c7acbff439575c343 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 10 May 2016 22:10:38 -0400 Subject: vim-patch:7.4.1018 Problem: Failure running tests. Solution: Add missing change to list of old style tests. https://github.com/vim/vim/commit/af2dff8fbc0e0c1dd7cb5ae058c3b896c28f7d24 --- src/nvim/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/version.c b/src/nvim/version.c index b6b55964f3..bd712b8ac0 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -666,7 +666,7 @@ static int included_patches[] = { // 1021 NA // 1020 NA // 1019 NA - // 1018, + 1018, 1017, // 1016 NA 1015, -- cgit From 853440053c3495958644cb6deabde733ede5dd56 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Tue, 10 May 2016 22:47:25 -0400 Subject: vim-patch:7.4.1034 Problem: There is no test for the 'backspace' option behavior. Solution: Add a test. (Hirohito Higashi) https://github.com/vim/vim/commit/aac624bacd4be0c5a8e603dac9020f4a754c9c9c --- src/nvim/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/version.c b/src/nvim/version.c index bd712b8ac0..fce2896ddf 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -650,7 +650,7 @@ static int included_patches[] = { 1037, 1036, 1035, - // 1034, + 1034, // 1033 NA 1032, // 1031 NA, -- cgit