0
0
mirror of https://github.com/vim/vim.git synced 2025-10-04 05:25:06 -04:00

patch 8.2.2490: 'wrap' option is always reset when starting diff mode

Problem:    'wrap' option is always reset when starting diff mode.
Solution:   Add the "followwrap" item in 'diffopt'. (Rick Howe, closes #7797)
This commit is contained in:
Bram Moolenaar
2021-02-10 13:18:17 +01:00
parent 963ffa0a5a
commit 4223d43c0f
5 changed files with 38 additions and 7 deletions

View File

@@ -1045,6 +1045,21 @@ func Test_diff_closeoff()
enew!
endfunc
func Test_diff_followwrap()
new
set diffopt+=followwrap
set wrap
diffthis
call assert_equal(1, &wrap)
diffoff
set nowrap
diffthis
call assert_equal(0, &wrap)
diffoff
set diffopt&
bwipe!
endfunc
func Test_diff_maintains_change_mark()
enew!
call setline(1, ['a', 'b', 'c', 'd'])