diff src/testdir/test_scroll_opt.vim @ 32439:9d072cccc8fc v9.0.1551

patch 9.0.1551: position of marker for 'smoothscroll' not computed correctly Commit: https://github.com/vim/vim/commit/24b62ec8258cc7c9ca2c09f645f7f6b02584c892 Author: Luuk van Baal <luukvbaal@gmail.com> Date: Sat May 13 14:12:15 2023 +0100 patch 9.0.1551: position of marker for 'smoothscroll' not computed correctly Problem: Position of marker for 'smoothscroll' not computed correctly. Solution: Take 'list' and other options into account. (Luuk van Baal, closes #12393)
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 May 2023 15:15:03 +0200
parents 11bc7fa31c3b
children 45c426cebfcd
line wrap: on
line diff
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -426,8 +426,7 @@ func Test_smoothscroll_cursor_position()
 
   " Test moving the cursor behind the <<< display with 'virtualedit'
   set virtualedit=all
-  exe "normal \<C-E>"
-  norm 3lgkh
+  exe "normal \<C-E>3lgkh"
   call s:check_col_calc(3, 2, 23)
   set virtualedit&
 
@@ -499,6 +498,16 @@ func Test_smoothscroll_cursor_position()
   call s:check_col_calc(1, 3, 37)
   normal gg
 
+  " Test list + listchars "precedes", where there is always 1 overlap
+  " regardless of number and cpo-=n.
+  setl number list listchars=precedes:< cpo-=n
+  call s:check_col_calc(5, 1, 1)
+  exe "normal 2|\<C-E>"
+  call s:check_col_calc(6, 1, 18)
+  norm h
+  call s:check_col_calc(5, 2, 17)
+  normal gg
+
   bwipe!
 endfunc