From a6d63591f1fc61d570b646306d7c259b5ec2cace Mon Sep 17 00:00:00 2001 From: luukvbaal Date: Sat, 13 May 2023 02:15:01 +0200 Subject: vim-patch:9.0.1545: text not scrolled when cursor moved with "g0" and "h" (#23599) Problem: Text not scrolled when cursor moved with "g0" and "h". Solution: Adjust w_skipcol when needed. (Luuk van Baal, closes vim/vim#12387) https://github.com/vim/vim/commit/8667a5678f983ba899825b810ab849952d49bcb8 --- test/old/testdir/test_scroll_opt.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') diff --git a/test/old/testdir/test_scroll_opt.vim b/test/old/testdir/test_scroll_opt.vim index 6f3d12679e..cf37195e1d 100644 --- a/test/old/testdir/test_scroll_opt.vim +++ b/test/old/testdir/test_scroll_opt.vim @@ -419,6 +419,18 @@ func Test_smoothscroll_cursor_position() exe "normal \" call s:check_col_calc(1, 3, 41) + " Test "g0/g" + exe "normal gg\" + norm $gkg0 + call s:check_col_calc(1, 2, 21) + + " Test moving the cursor behind the <<< display with 'virtualedit' + set virtualedit=all + exe "normal \" + norm 3lgkh + call s:check_col_calc(3, 2, 23) + set virtualedit& + normal gg3l exe "normal \" -- cgit