Mercurial > vim
comparison src/testdir/test_terminal3.vim @ 22093:b85e13213b11 v8.2.1596
patch 8.2.1596: using win_screenpos('.') in tests works but is wrong
Commit: https://github.com/vim/vim/commit/7dfc5ce7cf4a7f63370d7dce2e13f7410ca0230a
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 5 15:05:30 2020 +0200
patch 8.2.1596: using win_screenpos('.') in tests works but is wrong
Problem: Using win_screenpos('.') in tests works but is wrong.
Solution: Use win_screenpos(0).
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Sep 2020 15:15:05 +0200 |
parents | e0af4660dfc7 |
children | 2e681033d766 |
comparison
equal
deleted
inserted
replaced
22092:d9086cf107a1 | 22093:b85e13213b11 |
---|---|
549 " And then add 100 / 200 tolerance. | 549 " And then add 100 / 200 tolerance. |
550 let [xroot, yroot] = getwinpos() | 550 let [xroot, yroot] = getwinpos() |
551 let winpos = 50->getwinpos() | 551 let winpos = 50->getwinpos() |
552 call assert_equal(xroot, winpos[0]) | 552 call assert_equal(xroot, winpos[0]) |
553 call assert_equal(yroot, winpos[1]) | 553 call assert_equal(yroot, winpos[1]) |
554 let [winrow, wincol] = win_screenpos('.') | 554 let [winrow, wincol] = win_screenpos(0) |
555 let xoff = wincol * (has('gui_running') ? 14 : 7) + 100 | 555 let xoff = wincol * (has('gui_running') ? 14 : 7) + 100 |
556 let yoff = winrow * (has('gui_running') ? 20 : 10) + 200 | 556 let yoff = winrow * (has('gui_running') ? 20 : 10) + 200 |
557 call assert_inrange(xroot + 2, xroot + xoff, xpos) | 557 call assert_inrange(xroot + 2, xroot + xoff, xpos) |
558 call assert_inrange(yroot + 2, yroot + yoff, ypos) | 558 call assert_inrange(yroot + 2, yroot + yoff, ypos) |
559 | 559 |