0
0
mirror of https://github.com/vim/vim.git synced 2025-11-10 10:47:23 -05:00

patch 9.0.1493: popup menu position wrong in window with toolbar

Problem:    Popup menu position wrong in window with toolbar.
Solution:   Take the window toolbar into account when positioning the popup
            menu. (closes #12308)
This commit is contained in:
zeertzjq
2023-04-27 19:36:55 +01:00
committed by Bram Moolenaar
parent b7f2270bab
commit 4e1ca0d9a6
4 changed files with 33 additions and 2 deletions

View File

@@ -1649,7 +1649,7 @@ pum_make_popup(char_u *path_name, int use_mouse_pos)
{
// Hack: set mouse position at the cursor so that the menu pops up
// around there.
mouse_row = curwin->w_winrow + curwin->w_wrow;
mouse_row = W_WINROW(curwin) + curwin->w_wrow;
mouse_col = curwin->w_wincol + curwin->w_wcol;
}