comparison src/testdir/test_functions.vim @ 18623:3089b422b9dc v8.1.2304

patch 8.1.2304: cannot get the mouse position when getting a mouse click Commit: https://github.com/vim/vim/commit/db3a205147ce2c335d5c2181c1f789277f8775b0 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 16 18:22:41 2019 +0100 patch 8.1.2304: cannot get the mouse position when getting a mouse click Problem: Cannot get the mouse position when getting a mouse click. Solution: Add getmousepos().
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Nov 2019 18:30:04 +0100
parents 9a7bbad64376
children 9007e9896303
comparison
equal deleted inserted replaced
18622:5beb893fc3db 18623:3089b422b9dc
1329 1329
1330 func Test_getchar() 1330 func Test_getchar()
1331 call feedkeys('a', '') 1331 call feedkeys('a', '')
1332 call assert_equal(char2nr('a'), getchar()) 1332 call assert_equal(char2nr('a'), getchar())
1333 1333
1334 call setline(1, 'xxxx')
1334 call test_setmouse(1, 3) 1335 call test_setmouse(1, 3)
1335 let v:mouse_win = 9 1336 let v:mouse_win = 9
1336 let v:mouse_winid = 9 1337 let v:mouse_winid = 9
1337 let v:mouse_lnum = 9 1338 let v:mouse_lnum = 9
1338 let v:mouse_col = 9 1339 let v:mouse_col = 9
1340 call assert_equal("\<S-LeftMouse>", getchar()) 1341 call assert_equal("\<S-LeftMouse>", getchar())
1341 call assert_equal(1, v:mouse_win) 1342 call assert_equal(1, v:mouse_win)
1342 call assert_equal(win_getid(1), v:mouse_winid) 1343 call assert_equal(win_getid(1), v:mouse_winid)
1343 call assert_equal(1, v:mouse_lnum) 1344 call assert_equal(1, v:mouse_lnum)
1344 call assert_equal(3, v:mouse_col) 1345 call assert_equal(3, v:mouse_col)
1346 enew!
1345 endfunc 1347 endfunc
1346 1348
1347 func Test_libcall_libcallnr() 1349 func Test_libcall_libcallnr()
1348 if !has('libcall') 1350 if !has('libcall')
1349 return 1351 return