Skip to content

Commit 976b365

Browse files
ychinchrisbra
authored andcommitted
patch 9.1.1753: defaults: 'diffopt' option value can be improved
Problem: defaults: 'diffopt' option value can be improved Solution: Update diffopt defaults to include "indent-heuristic" and "inline:char" (Yee Cheng Chin) The default diff options have not been updated much despite new functionality having been added to Vim. - indent-heurstic: This has been enabled by default in Git since 33de716 in 2017. Given that Vim uses xdiff from Git, it makes sense to track the default configuration from Git. - inline:char: This turns on character-wise inline highlighting which is generally much better than the default inline:simple. It has been implemented since #16881 and we have not seen reports of any issues with it, and it has received good feedbacks. closes: #18255 Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent b49d695 commit 976b365

12 files changed

+88
-26
lines changed

runtime/doc/options.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*options.txt* For Vim version 9.1. Last change: 2025 Sep 10
1+
*options.txt* For Vim version 9.1. Last change: 2025 Sep 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3067,7 +3067,7 @@ A jump table for the options with a short description can be found at |Q_op|.
30673067

30683068
*'dip'* *'diffopt'*
30693069
'diffopt' 'dip' string (default
3070-
"internal,filler,closeoff,inline:simple")
3070+
"internal,filler,closeoff,indent-heuristic,inline:char")
30713071
global
30723072
{not available when compiled without the |+diff|
30733073
feature}

runtime/doc/version9.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*version9.txt* For Vim version 9.1. Last change: 2025 Sep 10
1+
*version9.txt* For Vim version 9.1. Last change: 2025 Sep 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -41670,6 +41670,8 @@ Default values: ~
4167041670
- the default value for 'showcmd' is always enabled when using non-compatible
4167141671
mode (previously, it was off on UNIX systems) and consequently removed from
4167241672
|defaults.vim|
41673+
- Improve the diff experience by updating the 'diffopt' default value to
41674+
"internal,filler,closeoff,indent-heuristic,inline:char".
4167341675

4167441676
Completion: ~
4167541677
- allow to complete directories from 'cdpath' for |:cd| and similar commands,

src/diff.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ static int diff_need_update = FALSE; // ex_diffupdate needs to be called
4646
#define ALL_WHITE_DIFF (DIFF_IWHITE | DIFF_IWHITEALL | DIFF_IWHITEEOL)
4747
#define ALL_INLINE (DIFF_INLINE_NONE | DIFF_INLINE_SIMPLE | DIFF_INLINE_CHAR | DIFF_INLINE_WORD)
4848
#define ALL_INLINE_DIFF (DIFF_INLINE_CHAR | DIFF_INLINE_WORD)
49-
static int diff_flags = DIFF_INTERNAL | DIFF_FILLER | DIFF_CLOSE_OFF;
49+
static int diff_flags = DIFF_INTERNAL | DIFF_FILLER | DIFF_CLOSE_OFF | DIFF_INLINE_CHAR;
5050

51-
static long diff_algorithm = 0;
51+
static long diff_algorithm = XDF_INDENT_HEURISTIC;
5252

5353
#define LBUFLEN 50 // length of line in diff file
5454

src/optiondefs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,7 @@ static struct vimoption options[] =
896896
|P_NODUP,
897897
#ifdef FEAT_DIFF
898898
(char_u *)&p_dip, PV_NONE, did_set_diffopt, expand_set_diffopt,
899-
{(char_u *)"internal,filler,closeoff,inline:simple",
899+
{(char_u *)"internal,filler,closeoff,indent-heuristic,inline:char",
900900
(char_u *)NULL}
901901
#else
902902
(char_u *)NULL, PV_NONE, NULL, NULL,

src/testdir/dumps/Test_diff_10.dump

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
|~| @35||+1#0000000&|~+0#4040ff13&| @35
1818
|~| @35||+1#0000000&|~+0#4040ff13&| @35
1919
|X+3#0000000&|d|i|f|i|l|e|1| @10|1|,|0|-|1| @9|A|l@1| |X+1&&|d|i|f|i|l|e|2| @10|1|,|0|-|1| @9|A|l@1
20-
|:+0&&|s|e|t| |d|i|f@1|o|p|t|+|=|i|n|t|e|r|n|a|l| @52
20+
|:+0&&| @73

src/testdir/dumps/Test_diff_with_cursorline_01.dump

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
| +0#0000e05#a8a8a8255@1|b+8#ffffff16#ff404010|e@1| @31||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
22
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1>f+8#ffffff16#ff404010|o@1| @31
33
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31
4-
| +0#0000e05#a8a8a8255@1|b+2#0000000#ff404010|a|z| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|f+2#0000000#ff404010|o@1| +0&#ffd7ff255@31
5-
| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|a|r| @31
4+
| +0#0000e05#a8a8a8255@1|b+0#0000000#ffd7ff255|a|z+2&#ff404010| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|f+2#0000000#ff404010|o@1| +0&#ffd7ff255@31
5+
| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#ffd7ff255|a|r+2&#ff404010| +0&#ffd7ff255@31
66
|~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
77
|~| @35||+1#0000000&|~+0#4040ff13&| @35
88
|~| @35||+1#0000000&|~+0#4040ff13&| @35

src/testdir/dumps/Test_diff_with_cursorline_02.dump

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|e@1| @31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
22
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31
33
| +0#0000e05#a8a8a8255@1|f+8#ffffff16#ff404010|o@1| @31||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1>f+8#ffffff16#ff404010|o@1| @31
4-
| +0#0000e05#a8a8a8255@1|b+2#0000000#ff404010|a|z| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|f+2#0000000#ff404010|o@1| +0&#ffd7ff255@31
5-
| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|a|r| @31
4+
| +0#0000e05#a8a8a8255@1|b+0#0000000#ffd7ff255|a|z+2&#ff404010| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|f+2#0000000#ff404010|o@1| +0&#ffd7ff255@31
5+
| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#ffd7ff255|a|r+2&#ff404010| +0&#ffd7ff255@31
66
|~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
77
|~| @35||+1#0000000&|~+0#4040ff13&| @35
88
|~| @35||+1#0000000&|~+0#4040ff13&| @35

src/testdir/dumps/Test_diff_with_cursorline_03.dump

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|e@1| @31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
22
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31
33
| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31||+1&&| +0#0000e05#a8a8a8255@1|f+0#0000000#ffffff0|o@1| @31
4-
| +0#0000e05#a8a8a8255@1|b+10#ffffff16#ff404010|a|z| +8&&@31||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1>f+10#ffffff16#ff404010|o@1| +8&&@31
5-
| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255|a|r| @31
4+
| +0#0000e05#a8a8a8255@1|b+8#ffffff16#ff404010|a|z+10&&| +8&&@31||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1>f+10#ffffff16#ff404010|o@1| +8&&@31
5+
| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34||+1#0000000#ffffff0| +0#0000e05#a8a8a8255@1|b+0#0000000#ffd7ff255|a|r+2&#ff404010| +0&#ffd7ff255@31
66
|~+0#4040ff13#ffffff0| @35||+1#0000000&|~+0#4040ff13&| @35
77
|~| @35||+1#0000000&|~+0#4040ff13&| @35
88
|~| @35||+1#0000000&|~+0#4040ff13&| @35
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
|<+0#4040ff13#ffffff0@2| +0#0000000&|a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a||+1&&|<+0#4040ff13&@2| +0#0000000&|a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a
2+
| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| ||+1&&| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c|
3+
| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c
4+
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0|a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| @14||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0|a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| @14
5+
| +0#0000e05#a8a8a8255@1|f+2#0000000#ff404010|o@1| +0&#ffd7ff255@31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|b+2#0000000#ff404010|a|r|b+0&#ffd7ff255|a>r| @28
6+
| +0#0000e05#a8a8a8255@1|b+0#0000000#ffd7ff255|a|r| @31||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@34
7+
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0|a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0|a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b
8+
| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a
9+
| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| ||+1&&| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c|
10+
| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c
11+
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0|a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0|a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b
12+
| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a||+1&&| +0#0000e05#a8a8a8255@1|c+0#0000000#ffffff0| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a
13+
| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| ||+1&&| +0#0000e05#a8a8a8255@1|b+0#0000000#ffffff0|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c|
14+
| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c
15+
| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0|a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| @14||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0|a|b|c| |a|b|c| |a|b|c| |a|b|c| |a|b|c| @14
16+
|~+0#4040ff13&| @35||+1#0000000&|~+0#4040ff13&| @35
17+
|~| @35||+1#0000000&|~+0#4040ff13&| @35
18+
|~| @35||+1#0000000&|~+0#4040ff13&| @35
19+
|[+1#0000000&|N|o| |N|a|m|e|]| |[|+|]| @5|2|,|4| @11|A|l@1| |[+3&&|N|o| |N|a|m|e|]| |[|+|]| @5|2|,|6| @11|A|l@1
20+
| +0&&@74

src/testdir/test_diffmode.vim

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@ func Test_diff_nomodifiable()
862862
endfunc
863863

864864
func Test_diff_hlID()
865+
set diffopt=internal,filler
865866
new
866867
call setline(1, [1, 2, 3, 'Yz', 'a dxxg',])
867868
diffthis
@@ -904,6 +905,7 @@ func Test_diff_hlID()
904905
call assert_equal(synIDattr(diff_hlID(3, 1), "name"), "")
905906

906907
%bwipe!
908+
set diffopt&
907909
endfunc
908910

909911
func Test_diff_filler()
@@ -1079,18 +1081,18 @@ func Test_diff_screen()
10791081
call term_sendkeys(buf, ":set diffopt+=algorithm:histogram\<cr>")
10801082
call VerifyScreenDump(buf, 'Test_diff_09', {})
10811083

1082-
" Test 10-11: normal/indent-heuristic
1084+
" Test 10-11: with/without indent-heuristic
10831085
call term_sendkeys(buf, ":set diffopt&vim\<cr>")
10841086
call WriteDiffFiles(buf, ['', ' def finalize(values)', '', ' values.each do |v|', ' v.finalize', ' end'],
10851087
\ ['', ' def finalize(values)', '', ' values.each do |v|', ' v.prepare', ' end', '',
10861088
\ ' values.each do |v|', ' v.finalize', ' end'])
10871089
call term_sendkeys(buf, ":diffupdate!\<cr>")
1088-
call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
1089-
call VerifyScreenDump(buf, 'Test_diff_10', {})
1090+
call term_sendkeys(buf, ":set diffopt+=internal\<cr>:\<cr>")
1091+
call VerifyScreenDump(buf, 'Test_diff_11', {})
10901092

10911093
" Leave trailing : at commandline!
1092-
call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>:\<cr>")
1093-
call VerifyScreenDump(buf, 'Test_diff_11', {}, 'one')
1094+
call term_sendkeys(buf, ":set diffopt-=indent-heuristic\<cr>:\<cr>")
1095+
call VerifyScreenDump(buf, 'Test_diff_10', {}, 'one')
10941096
" shouldn't matter, if indent-algorithm comes before or after the algorithm
10951097
call term_sendkeys(buf, ":set diffopt&\<cr>")
10961098
call term_sendkeys(buf, ":set diffopt+=indent-heuristic,algorithm:patience\<cr>:\<cr>")
@@ -1331,6 +1333,7 @@ func Test_diff_with_syntax()
13311333
call writefile(lines, 'Xprogram2.c', 'D')
13321334

13331335
let lines =<< trim END
1336+
set diffopt=internal,filler
13341337
edit Xprogram1.c
13351338
diffsplit Xprogram2.c
13361339
END
@@ -1473,6 +1476,7 @@ func Test_diff_rnu()
14731476
CheckScreendump
14741477

14751478
let content =<< trim END
1479+
set diffopt=internal,filler
14761480
call setline(1, ['a', 'a', 'a', 'y', 'b', 'b', 'b', 'b', 'b'])
14771481
vnew
14781482
call setline(1, ['a', 'a', 'a', 'x', 'x', 'x', 'b', 'b', 'b', 'b', 'b'])
@@ -1560,6 +1564,7 @@ endfunc
15601564
" Test for adding/removing lines inside diff chunks, between diff chunks
15611565
" and before diff chunks
15621566
func Test_diff_modify_chunks()
1567+
set diffopt=internal,filler
15631568
enew!
15641569
let w2_id = win_getid()
15651570
call setline(1, ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i'])
@@ -1639,6 +1644,7 @@ func Test_diff_modify_chunks()
16391644
call assert_equal(['', '', '', '', '', '', '', '', ''], hl)
16401645

16411646
%bw!
1647+
set diffopt&
16421648
endfunc
16431649

16441650
func Test_diff_binary()
@@ -2868,7 +2874,7 @@ func Test_linematch_diff()
28682874
call term_sendkeys(buf, ":set autoread\<CR>\<c-w>w:set autoread\<CR>\<c-w>w")
28692875

28702876
" enable linematch
2871-
call term_sendkeys(buf, ":set diffopt+=linematch:30\<CR>")
2877+
call term_sendkeys(buf, ":set diffopt=internal,filler,linematch:30\<CR>")
28722878
call WriteDiffFiles(buf, ['// abc d?',
28732879
\ '// d?',
28742880
\ '// d?' ],
@@ -2896,7 +2902,7 @@ func Test_linematch_diff_iwhite()
28962902
call term_sendkeys(buf, ":set autoread\<CR>\<c-w>w:set autoread\<CR>\<c-w>w")
28972903

28982904
" setup a diff with 2 files and set linematch:30, with ignore white
2899-
call term_sendkeys(buf, ":set diffopt+=linematch:30\<CR>")
2905+
call term_sendkeys(buf, ":set diffopt=internal,filler,linematch:30\<CR>")
29002906
call WriteDiffFiles(buf, ['void testFunction () {',
29012907
\ ' for (int i = 0; i < 10; i++) {',
29022908
\ ' for (int j = 0; j < 10; j++) {',
@@ -2923,7 +2929,7 @@ func Test_linematch_diff_grouping()
29232929
call term_sendkeys(buf, ":set autoread\<CR>\<c-w>w:set autoread\<CR>\<c-w>w")
29242930

29252931
" a diff that would result in multiple groups before grouping optimization
2926-
call term_sendkeys(buf, ":set diffopt+=linematch:30\<CR>")
2932+
call term_sendkeys(buf, ":set diffopt=internal,filler,linematch:30\<CR>")
29272933
call WriteDiffFiles(buf, ['!A',
29282934
\ '!B',
29292935
\ '!C' ],
@@ -2961,7 +2967,7 @@ func Test_linematch_diff_scroll()
29612967
call term_sendkeys(buf, ":set autoread\<CR>\<c-w>w:set autoread\<CR>\<c-w>w")
29622968

29632969
" a diff that would result in multiple groups before grouping optimization
2964-
call term_sendkeys(buf, ":set diffopt+=linematch:30\<CR>")
2970+
call term_sendkeys(buf, ":set diffopt=internal,filler,linematch:30\<CR>")
29652971
call WriteDiffFiles(buf, ['!A',
29662972
\ '!B',
29672973
\ '!C' ],
@@ -2992,7 +2998,7 @@ func Test_linematch_line_limit_exceeded()
29922998
let buf = RunVimInTerminal('-d Xdifile1 Xdifile2', {})
29932999
call term_sendkeys(buf, ":set autoread\<CR>\<c-w>w:set autoread\<CR>\<c-w>w")
29943000

2995-
call term_sendkeys(buf, ":set diffopt+=linematch:10\<CR>")
3001+
call term_sendkeys(buf, ":set diffopt=internal,filler,linematch:10\<CR>")
29963002
" a diff block will not be aligned with linematch because it's contents
29973003
" exceed 10 lines
29983004
call WriteDiffFiles(buf,
@@ -3044,7 +3050,7 @@ func Test_linematch_3diffs()
30443050
call term_sendkeys(buf, "1\<c-w>w:set autoread\<CR>")
30453051
call term_sendkeys(buf, "2\<c-w>w:set autoread\<CR>")
30463052
call term_sendkeys(buf, "3\<c-w>w:set autoread\<CR>")
3047-
call term_sendkeys(buf, ":set diffopt+=linematch:30\<CR>")
3053+
call term_sendkeys(buf, ":set diffopt=internal,filler,linematch:30\<CR>")
30483054
call WriteDiffFiles3(buf,
30493055
\ ["",
30503056
\ " common line",
@@ -3079,7 +3085,7 @@ func Test_linematch_3diffs_sanity_check()
30793085
call delete('.Xfile_linematch2.swp')
30803086
call delete('.Xfile_linematch3.swp')
30813087
let lines =<< trim END
3082-
set diffopt+=linematch:60
3088+
set diffopt=internal,filler,linematch:60
30833089
call feedkeys("Aq\<esc>")
30843090
call feedkeys("GAklm\<esc>")
30853091
call feedkeys("o")

0 commit comments

Comments
 (0)