To: vim_dev@googlegroups.com Subject: Patch 8.2.3936 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3936 Problem: No proper test for maintaining change mark in diff mode. Solution: Run the test with internal and external diff. (Sean Dewar, closes #9424) Files: src/testdir/test_diffmode.vim *** ../vim-8.2.3935/src/testdir/test_diffmode.vim 2021-12-28 18:29:28.633385576 +0000 --- src/testdir/test_diffmode.vim 2021-12-29 16:41:13.790305964 +0000 *************** *** 1189,1210 **** endfunc func Test_diff_maintains_change_mark() ! enew! ! call setline(1, ['a', 'b', 'c', 'd']) ! diffthis ! new ! call setline(1, ['a', 'b', 'c', 'e']) ! " Set '[ and '] marks ! 2,3yank ! call assert_equal([2, 3], [line("'["), line("']")]) ! " Verify they aren't affected by the implicit diff ! diffthis ! call assert_equal([2, 3], [line("'["), line("']")]) ! " Verify they aren't affected by an explicit diff ! diffupdate ! call assert_equal([2, 3], [line("'["), line("']")]) ! bwipe! ! bwipe! endfunc " Test for 'patchexpr' --- 1189,1218 ---- endfunc func Test_diff_maintains_change_mark() ! func DiffMaintainsChangeMark() ! enew! ! call setline(1, ['a', 'b', 'c', 'd']) ! diffthis ! new ! call setline(1, ['a', 'b', 'c', 'e']) ! " Set '[ and '] marks ! 2,3yank ! call assert_equal([2, 3], [line("'["), line("']")]) ! " Verify they aren't affected by the implicit diff ! diffthis ! call assert_equal([2, 3], [line("'["), line("']")]) ! " Verify they aren't affected by an explicit diff ! diffupdate ! call assert_equal([2, 3], [line("'["), line("']")]) ! bwipe! ! bwipe! ! endfunc ! ! set diffopt-=internal ! call DiffMaintainsChangeMark() ! set diffopt+=internal ! call DiffMaintainsChangeMark() ! set diffopt& endfunc " Test for 'patchexpr' *** ../vim-8.2.3935/src/version.c 2021-12-29 16:05:28.026222402 +0000 --- src/version.c 2021-12-29 16:44:09.473864201 +0000 *************** *** 751,752 **** --- 751,754 ---- { /* Add new patch number below this line */ + /**/ + 3936, /**/ -- hundred-and-one symptoms of being an internet addict: 141. You'd rather go to http://www.weather.com/ than look out your window. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///