comparison src/testdir/test_terminal.vim @ 17912:9fac6d0de69a v8.1.1952

patch 8.1.1952: more functions can be used as a method Commit: https://github.com/vim/vim/commit/5d69fdb7c4b91faf2d92b8d449cc9460f3035fb3 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 31 19:13:58 2019 +0200 patch 8.1.1952: more functions can be used as a method Problem: More functions can be used as a method. Solution: Allow more functions to be used as a method.
author Bram Moolenaar <Bram@vim.org>
date Sat, 31 Aug 2019 19:15:03 +0200
parents ba18f78c8529
children 049a7481d737
comparison
equal deleted inserted replaced
17911:6ec211f84436 17912:9fac6d0de69a
2064 " Position must be bigger than the getwinpos() result of Vim itself. 2064 " Position must be bigger than the getwinpos() result of Vim itself.
2065 " The calculation in the console assumes a 10 x 7 character cell. 2065 " The calculation in the console assumes a 10 x 7 character cell.
2066 " In the GUI it can be more, let's assume a 20 x 14 cell. 2066 " In the GUI it can be more, let's assume a 20 x 14 cell.
2067 " And then add 100 / 200 tolerance. 2067 " And then add 100 / 200 tolerance.
2068 let [xroot, yroot] = getwinpos() 2068 let [xroot, yroot] = getwinpos()
2069 let winpos = 50->getwinpos()
2070 call assert_equal(xroot, winpos[0])
2071 call assert_equal(yroot, winpos[1])
2069 let [winrow, wincol] = win_screenpos('.') 2072 let [winrow, wincol] = win_screenpos('.')
2070 let xoff = wincol * (has('gui_running') ? 14 : 7) + 100 2073 let xoff = wincol * (has('gui_running') ? 14 : 7) + 100
2071 let yoff = winrow * (has('gui_running') ? 20 : 10) + 200 2074 let yoff = winrow * (has('gui_running') ? 20 : 10) + 200
2072 call assert_inrange(xroot + 2, xroot + xoff, xpos) 2075 call assert_inrange(xroot + 2, xroot + xoff, xpos)
2073 call assert_inrange(yroot + 2, yroot + yoff, ypos) 2076 call assert_inrange(yroot + 2, yroot + yoff, ypos)