mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.1581: using line() for global popup window doesn't work
Problem: Using line() for global popup window doesn't work. Solution: Set tabpage to "curtab". (closes #6847)
This commit is contained in:
parent
a60053b8f4
commit
1f42f5a675
@ -117,7 +117,7 @@ win_id2wp_tp(int id, tabpage_T **tpp)
|
|||||||
if (wp->w_id == id)
|
if (wp->w_id == id)
|
||||||
{
|
{
|
||||||
if (tpp != NULL)
|
if (tpp != NULL)
|
||||||
*tpp = tp;
|
*tpp = curtab; // any tabpage would do
|
||||||
return wp;
|
return wp;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -2239,6 +2239,18 @@ func Test_popup_settext()
|
|||||||
call delete('XtestPopupSetText')
|
call delete('XtestPopupSetText')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_popup_settext_getline()
|
||||||
|
let id = popup_create('', #{ tabpage: 0 })
|
||||||
|
call popup_settext(id, ['a','b'])
|
||||||
|
call assert_equal(2, line('$', id)) " OK :)
|
||||||
|
call popup_close(id)
|
||||||
|
|
||||||
|
let id = popup_create('', #{ tabpage: -1 })
|
||||||
|
call popup_settext(id, ['a','b'])
|
||||||
|
call assert_equal(2, line('$', id)) " Fails :(
|
||||||
|
call popup_close(id)
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_popup_hidden()
|
func Test_popup_hidden()
|
||||||
new
|
new
|
||||||
|
|
||||||
|
@ -754,6 +754,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1581,
|
||||||
/**/
|
/**/
|
||||||
1580,
|
1580,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user