]> granicus.if.org Git - vim/commitdiff
patch 8.1.0513: no error for set diffopt+=algorithm: v8.1.0513
authorBram Moolenaar <Bram@vim.org>
Mon, 5 Nov 2018 20:21:33 +0000 (21:21 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 5 Nov 2018 20:21:33 +0000 (21:21 +0100)
Problem:    No error for set diffopt+=algorithm:.
Solution:   Check for missing argument. (Hirohito Higashi, closes #3598)

src/diff.c
src/testdir/gen_opt_test.vim
src/version.c

index c001761340a13e4fa50ed8367d86ed0bbcbfc09b..0399e7967a53499bfb2fdf043beb58394e9d8001 100644 (file)
@@ -2266,6 +2266,8 @@ diffopt_changed(void)
                p += 9;
                diff_algorithm_new = XDF_HISTOGRAM_DIFF;
            }
+           else
+               return FAIL;
        }
 
        if (*p != ',' && *p != NUL)
index a742153cda023876b0170fb114debfb6b9dc0f6d..c0e89cfb0f8aee4f1145b257db67e05197bcd36a 100644 (file)
@@ -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', '']],
index 36397023149d6f83bce2925258513ac0f0eedfd6..3ed258f6972a074f7dd68c30421d91c074b81f72 100644 (file)
@@ -792,6 +792,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    513,
 /**/
     512,
 /**/