comparison src/testdir/test_cursorline.vim @ 28133:373f1afadfa3 v8.2.4591

patch 8.2.4591: cursor line not updated when a callback moves the cursor Commit: https://github.com/vim/vim/commit/e7a74d53754765f22ef8ce71c915bb669d5f7f3f Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 19 11:10:15 2022 +0000 patch 8.2.4591: cursor line not updated when a callback moves the cursor Problem: Cursor line not updated when a callback moves the cursor. Solution: Check if the cursor moved. (closes https://github.com/vim/vim/issues/9970)
author Bram Moolenaar <Bram@vim.org>
date Sat, 19 Mar 2022 12:15:04 +0100
parents 95d6e3c9aa1e
children b4c111ea83b1
comparison
equal deleted inserted replaced
28132:a4c48c2beb9f 28133:373f1afadfa3
245 call StopVimInTerminal(buf) 245 call StopVimInTerminal(buf)
246 call delete('Xscript') 246 call delete('Xscript')
247 call delete('Xtextfile') 247 call delete('Xtextfile')
248 endfunc 248 endfunc
249 249
250 func Test_cursorline_callback()
251 CheckScreendump
252 CheckFeature timers
253
254 let lines =<< trim END
255 call setline(1, ['aaaaa', 'bbbbb', 'ccccc', 'ddddd'])
256 set cursorline
257 call cursor(4, 1)
258
259 func Func(timer)
260 call cursor(2, 1)
261 endfunc
262
263 call timer_start(300, 'Func')
264 END
265 call writefile(lines, 'Xcul_timer')
266
267 let buf = RunVimInTerminal('-S Xcul_timer', #{rows: 8})
268 call TermWait(buf, 310)
269 call VerifyScreenDump(buf, 'Test_cursorline_callback_1', {})
270
271 call StopVimInTerminal(buf)
272 call delete('Xcul_timer')
273 endfunc
274
275
250 " vim: shiftwidth=2 sts=2 expandtab 276 " vim: shiftwidth=2 sts=2 expandtab