diff options
| author | Bram Moolenaar <Bram@vim.org> | 2018-11-05 21:21:33 +0100 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2018-11-05 21:21:33 +0100 |
| commit | d0721058f494143186f66a60151c9634031a8c96 (patch) | |
| tree | 3c47ba880d622c5571b370bbbe7923f44c91b485 | |
| parent | 389ab7122bec99c11ad4ce6d87cc6f38a21e4e40 (diff) | |
| download | vim-git-d0721058f494143186f66a60151c9634031a8c96.tar.gz | |
patch 8.1.0513: no error for set diffopt+=algorithm:v8.1.0513
Problem: No error for set diffopt+=algorithm:.
Solution: Check for missing argument. (Hirohito Higashi, closes #3598)
| -rw-r--r-- | src/diff.c | 2 | ||||
| -rw-r--r-- | src/testdir/gen_opt_test.vim | 2 | ||||
| -rw-r--r-- | src/version.c | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/src/diff.c b/src/diff.c index c00176134..0399e7967 100644 --- 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 index a742153cd..c0e89cfb0 100644 --- 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 index 363970231..3ed258f69 100644 --- 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, |
