0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 8.2.1727: a popup created with "cursorline" will ignore "firstline"

Problem:    A popup created with "cursorline" will ignore "firstline".
Solution:   When both "cursorline" and "firstline" are present put the cursor
            on "firstline". (closes #7000)  Add the "winid" argument to
            getcurpos().
This commit is contained in:
Bram Moolenaar
2020-09-22 21:55:41 +02:00
parent 4f73b8e9cc
commit 99ca9c4868
7 changed files with 89 additions and 14 deletions

View File

@@ -2520,7 +2520,19 @@ func Test_getcurpos_setpos()
call assert_equal('6', @")
call assert_equal(-1, setpos('.', test_null_list()))
call assert_equal(-1, setpos('.', {}))
let winid = win_getid()
normal G$
let pos = getcurpos()
wincmd w
call assert_equal(pos, getcurpos(winid))
wincmd w
close!
call assert_equal(getcurpos(), getcurpos(0))
call assert_equal([0, 0, 0, 0, 0], getcurpos(-1))
call assert_equal([0, 0, 0, 0, 0], getcurpos(1999))
endfunc
" Test for glob()