mirror of
https://github.com/neovim/neovim.git
synced 2025-10-03 16:36:30 +00:00
vim-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 vim/vim#7000) Add the "winid" argument to
getcurpos().
99ca9c4868
Skip popup window related code.
Cherry-pick all of Test_getcurpos_setpos() from patch 8.2.0610.
This commit is contained in:
@@ -1712,6 +1712,33 @@ func Test_nr2char()
|
||||
call assert_equal("\x80\xfc\b\xfd\x80\xfeX\x80\xfeX\x80\xfeX\x80\xfeX\x80\xfeX", eval('"\<M-' .. nr2char(0x40000000) .. '>"'))
|
||||
endfunc
|
||||
|
||||
" Test for getcurpos() and setpos()
|
||||
func Test_getcurpos_setpos()
|
||||
new
|
||||
call setline(1, ['012345678', '012345678'])
|
||||
normal gg6l
|
||||
let sp = getcurpos()
|
||||
normal 0
|
||||
call setpos('.', sp)
|
||||
normal jyl
|
||||
call assert_equal('6', @")
|
||||
call assert_equal(-1, setpos('.', v:_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
|
||||
|
||||
func HasDefault(msg = 'msg')
|
||||
return a:msg
|
||||
endfunc
|
||||
|
Reference in New Issue
Block a user