diff src/testdir/test_scroll_opt.vim @ 30845:fa3aba805a34 v9.0.0757

patch 9.0.0757: line number not visisble with 'smoothscroll', 'nu' and 'rnu' Commit: https://github.com/vim/vim/commit/eb4de629315f2682d8b314462d02422ec98d751a Author: Bram Moolenaar <Bram@vim.org> Date: Sat Oct 15 13:42:17 2022 +0100 patch 9.0.0757: line number not visisble with 'smoothscroll', 'nu' and 'rnu' Problem: Line number not visisble with 'smoothscroll', 'nu' and 'rnu'. Solution: Put the ">>>" after the line number instead of on top.
author Bram Moolenaar <Bram@vim.org>
date Sat, 15 Oct 2022 14:45:07 +0200
parents ffa5492137c3
children 2c03ff81cbcb
line wrap: on
line diff
--- a/src/testdir/test_scroll_opt.vim
+++ b/src/testdir/test_scroll_opt.vim
@@ -121,6 +121,17 @@ func Test_smoothscroll_number()
       set smoothscroll
       set number cpo+=n
       :3
+
+      def g:DoRel()
+        set number relativenumber scrolloff=0
+        :%del
+        setline(1, [
+          'one',
+          'very long text '->repeat(12),
+          'three',
+        ])
+        exe "normal 2Gzt\<C-E>"
+      enddef
   END
   call writefile(lines, 'XSmoothNumber', 'D')
   let buf = RunVimInTerminal('-S XSmoothNumber', #{rows: 12, cols: 40})
@@ -138,6 +149,9 @@ func Test_smoothscroll_number()
   call term_sendkeys(buf, "\<C-Y>")
   call VerifyScreenDump(buf, 'Test_smooth_number_6', {})
 
+  call term_sendkeys(buf, ":call DoRel()\<CR>")
+  call VerifyScreenDump(buf, 'Test_smooth_number_7', {})
+
   call StopVimInTerminal(buf)
 endfunc