diff src/testdir/test_execute_func.vim @ 18259:f254dd2bc107 v8.1.2124

patch 8.1.2124: ruler is not updated if win_execute() moves cursor Commit: https://github.com/vim/vim/commit/345f28df5482cd35f5fa74b06443376379f113b0 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Oct 8 22:20:35 2019 +0200 patch 8.1.2124: ruler is not updated if win_execute() moves cursor Problem: Ruler is not updated if win_execute() moves cursor. Solution: Update the status line. (closes https://github.com/vim/vim/issues/5022)
author Bram Moolenaar <Bram@vim.org>
date Tue, 08 Oct 2019 22:30:04 +0200
parents 11dca9732a48
children 49b78d6465e5
line wrap: on
line diff
--- a/src/testdir/test_execute_func.vim
+++ b/src/testdir/test_execute_func.vim
@@ -1,5 +1,7 @@
 " test execute()
 
+source view_util.vim
+
 func NestedEval()
   let nested = execute('echo "nested\nlines"')
   echo 'got: "' . nested . '"'
@@ -101,6 +103,24 @@ func Test_win_execute()
   bwipe!
 endfunc
 
+func Test_win_execute_update_ruler()
+  enew
+  call setline(1, range(500))
+  20
+  split
+  let winid = win_getid()
+  set ruler
+  wincmd w
+  let height = winheight(winid)
+  redraw
+  call assert_match('20,1', Screenline(height + 1))
+  let line = win_execute(winid, 'call cursor(100, 1)')
+  redraw
+  call assert_match('100,1', Screenline(height + 1))
+
+  bwipe!
+endfunc
+
 func Test_win_execute_other_tab()
   let thiswin = win_getid()
   tabnew