# HG changeset patch # User Bram Moolenaar # Date 1541449806 -3600 # Node ID 9c2352253376e2cb722df4dccd1faf98ad8dc9db # Parent bd0d66403ac4d69ce6cdf1a3933f54a298d2b7db patch 8.1.0513: no error for set diffopt+=algorithm: commit https://github.com/vim/vim/commit/d0721058f494143186f66a60151c9634031a8c96 Author: Bram Moolenaar Date: Mon Nov 5 21:21:33 2018 +0100 patch 8.1.0513: no error for set diffopt+=algorithm: Problem: No error for set diffopt+=algorithm:. Solution: Check for missing argument. (Hirohito Higashi, closes https://github.com/vim/vim/issues/3598) diff --git a/src/diff.c b/src/diff.c --- a/src/diff.c +++ b/src/diff.c @@ -2266,6 +2266,8 @@ diffopt_changed(void) p += 9; diff_algorithm_new = XDF_HISTOGRAM_DIFF; } + else + return FAIL; } if (*p != ',' && *p != NUL) diff --git a/src/testdir/gen_opt_test.vim b/src/testdir/gen_opt_test.vim --- a/src/testdir/gen_opt_test.vim +++ b/src/testdir/gen_opt_test.vim @@ -81,7 +81,7 @@ let test_values = { \ 'cryptmethod': [['', 'zip'], ['xxx']], \ 'cscopequickfix': [['', 's-', 's-,c+,e0'], ['xxx', 's,g,d']], \ 'debug': [['', 'msg', 'msg', 'beep'], ['xxx']], - \ 'diffopt': [['', 'filler', 'icase,iwhite'], ['xxx']], + \ 'diffopt': [['', 'filler', 'icase,iwhite'], ['xxx', 'algorithm:xxx', 'algorithm:']], \ 'display': [['', 'lastline', 'lastline,uhex'], ['xxx']], \ 'eadirection': [['', 'both', 'ver'], ['xxx', 'ver,hor']], \ 'encoding': [['latin1'], ['xxx', '']], diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -793,6 +793,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 513, +/**/ 512, /**/ 511,