Skip to content

Commit d072105

Browse files
committed
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 #3598)
1 parent 389ab71 commit d072105

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/diff.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2266,6 +2266,8 @@ diffopt_changed(void)
22662266
p += 9;
22672267
diff_algorithm_new = XDF_HISTOGRAM_DIFF;
22682268
}
2269+
else
2270+
return FAIL;
22692271
}
22702272

22712273
if (*p != ',' && *p != NUL)

src/testdir/gen_opt_test.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ let test_values = {
8181
\ 'cryptmethod': [['', 'zip'], ['xxx']],
8282
\ 'cscopequickfix': [['', 's-', 's-,c+,e0'], ['xxx', 's,g,d']],
8383
\ 'debug': [['', 'msg', 'msg', 'beep'], ['xxx']],
84-
\ 'diffopt': [['', 'filler', 'icase,iwhite'], ['xxx']],
84+
\ 'diffopt': [['', 'filler', 'icase,iwhite'], ['xxx', 'algorithm:xxx', 'algorithm:']],
8585
\ 'display': [['', 'lastline', 'lastline,uhex'], ['xxx']],
8686
\ 'eadirection': [['', 'both', 'ver'], ['xxx', 'ver,hor']],
8787
\ 'encoding': [['latin1'], ['xxx', '']],

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -792,6 +792,8 @@ static char *(features[]) =
792792

793793
static int included_patches[] =
794794
{ /* Add new patch number below this line */
795+
/**/
796+
513,
795797
/**/
796798
512,
797799
/**/

0 commit comments

Comments
 (0)