Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
18258:7392f162e56c | 18259:f254dd2bc107 |
---|---|
1 " test execute() | 1 " test execute() |
2 | |
3 source view_util.vim | |
2 | 4 |
3 func NestedEval() | 5 func NestedEval() |
4 let nested = execute('echo "nested\nlines"') | 6 let nested = execute('echo "nested\nlines"') |
5 echo 'got: "' . nested . '"' | 7 echo 'got: "' . nested . '"' |
6 endfunc | 8 endfunc |
99 | 101 |
100 call win_gotoid(otherwin) | 102 call win_gotoid(otherwin) |
101 bwipe! | 103 bwipe! |
102 endfunc | 104 endfunc |
103 | 105 |
106 func Test_win_execute_update_ruler() | |
107 enew | |
108 call setline(1, range(500)) | |
109 20 | |
110 split | |
111 let winid = win_getid() | |
112 set ruler | |
113 wincmd w | |
114 let height = winheight(winid) | |
115 redraw | |
116 call assert_match('20,1', Screenline(height + 1)) | |
117 let line = win_execute(winid, 'call cursor(100, 1)') | |
118 redraw | |
119 call assert_match('100,1', Screenline(height + 1)) | |
120 | |
121 bwipe! | |
122 endfunc | |
123 | |
104 func Test_win_execute_other_tab() | 124 func Test_win_execute_other_tab() |
105 let thiswin = win_getid() | 125 let thiswin = win_getid() |
106 tabnew | 126 tabnew |
107 call win_execute(thiswin, 'let xyz = 1') | 127 call win_execute(thiswin, 'let xyz = 1') |
108 call assert_equal(1, xyz) | 128 call assert_equal(1, xyz) |