Mercurial > vim
diff src/testdir/test_diffmode.vim @ 34815:8e38ceda0822 v9.1.0280
patch 9.1.0280: several issues with 'smoothscroll' support
Commit: https://github.com/vim/vim/commit/9148ba8a46baa3934c44164989cdcdec5d01d9e3
Author: Luuk van Baal <luukvbaal@gmail.com>
Date: Mon Apr 8 22:27:41 2024 +0200
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)
closes: #14410
Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 08 Apr 2024 22:45:03 +0200 |
parents | b20609f4ab37 |
children | 67dc61280eba |
line wrap: on
line diff
--- a/src/testdir/test_diffmode.vim +++ b/src/testdir/test_diffmode.vim @@ -2023,4 +2023,19 @@ func Test_diff_toggle_wrap_skipcol_leftc 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\<C-D>" + call assert_equal(6, line('w0')) + + %bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab