diff options
-rw-r--r-- | src/popupwin.c | 22 | ||||
-rw-r--r-- | src/testdir/test_popupwin_textprop.vim | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 15 insertions, 13 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index 48c017f67..efcc39598 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -452,24 +452,22 @@ apply_move_options(win_T *wp, dict_T *d) wp->w_popup_prop_type = 0; if (*str != NUL) { - nr = find_prop_type_id(str, wp->w_buffer); + wp->w_popup_prop_win = curwin; + di = dict_find(d, (char_u *)"textpropwin", -1); + if (di != NULL) + { + wp->w_popup_prop_win = find_win_by_nr_or_id(&di->di_tv); + if (!win_valid(wp->w_popup_prop_win)) + wp->w_popup_prop_win = curwin; + } + + nr = find_prop_type_id(str, wp->w_popup_prop_win->w_buffer); if (nr <= 0) nr = find_prop_type_id(str, NULL); if (nr <= 0) semsg(_(e_invarg2), str); else - { wp->w_popup_prop_type = nr; - wp->w_popup_prop_win = curwin; - - di = dict_find(d, (char_u *)"textpropwin", -1); - if (di != NULL) - { - wp->w_popup_prop_win = find_win_by_nr_or_id(&di->di_tv); - if (win_valid(wp->w_popup_prop_win)) - wp->w_popup_prop_win = curwin; - } - } } } diff --git a/src/testdir/test_popupwin_textprop.vim b/src/testdir/test_popupwin_textprop.vim index 8a68f15d7..b1127557c 100644 --- a/src/testdir/test_popupwin_textprop.vim +++ b/src/testdir/test_popupwin_textprop.vim @@ -13,10 +13,11 @@ func Test_textprop_popup() 50 normal zz set scrolloff=0 - call prop_type_add('popupMarker', #{highlight: 'DiffAdd'}) + call prop_type_add('popupMarker', #{highlight: 'DiffAdd', bufnr: bufnr('%')}) call prop_add(50, 11, #{ \ length: 7, \ type: 'popupMarker', + \ bufnr: bufnr('%'), \ }) let winid = popup_create('the text', #{ \ pos: 'botleft', @@ -68,6 +69,7 @@ func Test_textprop_popup_corners() let winid = popup_create('bottom left', #{ \ pos: 'botleft', \ textprop: 'popupMarker', + \ textpropwin: win_getid(), \ padding: [0,1,0,1], \ }) let winid = popup_create('bottom right', #{ diff --git a/src/version.c b/src/version.c index dc6caed5f..a682517de 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2307, +/**/ 2306, /**/ 2305, |