mirror of
https://github.com/vim/vim.git
synced 2025-10-26 09:14:23 -04:00
patch 9.1.1696: tabnr from getwininfo() for popup windows is always 0
Problem: getwininfo() has logic for getting the tabnr of a local popup
window, but due to only breaking from the inner loop, tp is
eventually set to NULL, so tabnr is always 0.
Solution: Break out of both loops, continue to use 0 for global popup
windows (Sean Dewar).
closes: #18111
Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
477c893c0a
commit
7d6be2cead
@@ -4619,4 +4619,19 @@ func Test_popupwin_bottom_position_without_decoration()
|
||||
call StopVimInTerminal(buf)
|
||||
endfunc
|
||||
|
||||
func Test_popup_getwininfo_tabnr()
|
||||
tab split
|
||||
let winid1 = popup_create('sup', #{tabpage: 1})
|
||||
let winid2 = popup_create('sup', {})
|
||||
let winid3 = popup_create('sup', #{tabpage: -1})
|
||||
call assert_equal(1, getwininfo(winid1)[0].tabnr)
|
||||
call assert_equal(2, getwininfo(winid2)[0].tabnr)
|
||||
call assert_equal(0, getwininfo(winid3)[0].tabnr)
|
||||
|
||||
call popup_close(winid1)
|
||||
call popup_close(winid2)
|
||||
call popup_close(winid3)
|
||||
tabonly
|
||||
endfunc
|
||||
|
||||
" vim: shiftwidth=2 sts=2
|
||||
|
||||
Reference in New Issue
Block a user