From 8f5fd0884b4424d028feef1bccd018a48c93a59c Mon Sep 17 00:00:00 2001 From: Luuk van Baal Date: Mon, 8 Apr 2024 22:40:55 +0200 Subject: vim-patch:9.1.0280: several issues with 'smoothscroll' support Problem: Logic to make sure cursor is in visible part of the screen after scrolling the text with 'smoothscroll' is scattered, asymmetric and contains bugs. Solution: Adjust and create helper function for 'smoothscroll' cursor logic. (Luuk van Baal) https://github.com/vim/vim/commit/9148ba8a46baa3934c44164989cdcdec5d01d9e3 --- test/old/testdir/test_diffmode.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test/old/testdir/test_diffmode.vim') diff --git a/test/old/testdir/test_diffmode.vim b/test/old/testdir/test_diffmode.vim index 67f6aaecbb..334bb3ee32 100644 --- a/test/old/testdir/test_diffmode.vim +++ b/test/old/testdir/test_diffmode.vim @@ -1772,4 +1772,19 @@ func Test_diff_toggle_wrap_skipcol_leftcol() bwipe! endfunc +" Ctrl-D reveals filler lines below the last line in the buffer. +func Test_diff_eob_halfpage() + 5new + call setline(1, ['']->repeat(10) + ['a']) + diffthis + 5new + call setline(1, ['']->repeat(3) + ['a', 'b']) + diffthis + wincmd j + exe "norm! G\" + call assert_equal(6, line('w0')) + + %bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit