diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-11-16 20:03:31 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-11-16 20:03:31 +0100 |
commit | a37cb55da6ba44c5e85a22b03a91e1b663aceddf (patch) | |
tree | d849289e4512042e6d1a86ebba9ebdbd8d033d0d /src/popupwin.c | |
parent | f36a2c7e60d86b1a1733a8f51ed72da9c6f76eb8 (diff) | |
download | vim-git-a37cb55da6ba44c5e85a22b03a91e1b663aceddf.tar.gz |
patch 8.1.2307: positioning popup doesn't work for buffer-local textpropv8.1.2307
Problem: Positioning popup doesn't work for buffer-local textprop.
Solution: Make it work. (closes #5225)
Diffstat (limited to 'src/popupwin.c')
-rw-r--r-- | src/popupwin.c | 22 |
1 files changed, 10 insertions, 12 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; - } - } } } |