To: vim_dev@googlegroups.com Subject: Patch 9.0.1435 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1435 Problem: Scrolling too many lines when 'wrap' and 'diff' are set. Solution: Only scroll by screenlines for 'diff' when 'wrap' is not set. (closes #12211) Files: src/move.c, src/testdir/test_diffmode.vim *** ../vim-9.0.1434/src/move.c 2023-03-12 21:20:51.437254187 +0000 --- src/move.c 2023-04-01 19:54:07.904573530 +0100 *************** *** 1763,1769 **** || (byfold && hasAnyFolding(curwin)) # endif # ifdef FEAT_DIFF ! || curwin->w_p_diff # endif ; } --- 1763,1769 ---- || (byfold && hasAnyFolding(curwin)) # endif # ifdef FEAT_DIFF ! || (curwin->w_p_diff && !curwin->w_p_wrap) # endif ; } *** ../vim-9.0.1434/src/testdir/test_diffmode.vim 2023-01-28 19:18:56.729720605 +0000 --- src/testdir/test_diffmode.vim 2023-04-01 19:53:04.784670696 +0100 *************** *** 1588,1593 **** --- 1588,1608 ---- call StopVimInTerminal(buf) endfunc + " This was scrolling too many lines. + func Test_diff_scroll_wrap_on() + 20new + 40vsplit + call setline(1, map(range(1, 9), 'repeat(v:val, 200)')) + setlocal number diff so=0 + redraw + normal! jj + call assert_equal(1, winsaveview().topline) + normal! j + call assert_equal(2, winsaveview().topline) + bwipe! + bwipe! + endfunc + " This was trying to update diffs for a buffer being closed func Test_diff_only() silent! lfile *** ../vim-9.0.1434/src/version.c 2023-04-01 13:51:56.846068822 +0100 --- src/version.c 2023-04-01 19:53:36.872620761 +0100 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1435, /**/ -- Q: How many hardware engineers does it take to change a lightbulb? A: None. We'll fix it in software. /// 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 ///