diff src/testdir/test_diffmode.vim @ 23895:e313b6ee2d9c v8.2.2490

patch 8.2.2490: 'wrap' option is always reset when starting diff mode Commit: https://github.com/vim/vim/commit/4223d43c0fb6ead1e611e4469a1680a9228b6015 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Feb 10 13:18:17 2021 +0100 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 https://github.com/vim/vim/issues/7797)
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Feb 2021 13:30:03 +0100
parents f74978697fb6
children f51ea1b6d512
line wrap: on
line diff
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
@@ -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'])