0
0
mirror of https://github.com/vim/vim.git synced 2025-10-01 04:54:07 -04:00

updated for version 7.0105

This commit is contained in:
Bram Moolenaar
2005-07-08 22:25:33 +00:00
parent 63b80986ac
commit 045e82deef
8 changed files with 40 additions and 38 deletions

View File

@@ -2206,7 +2206,7 @@ gui_mch_show_popupmenu(vimmenu_T *menu)
}
void
gui_make_popup(char_u *path_name)
gui_make_popup(char_u *path_name, int mouse_pos)
{
vimmenu_T *menu = gui_find_menu(path_name);
@@ -2216,7 +2216,15 @@ gui_make_popup(char_u *path_name)
/* Find the position of the current cursor */
GetDCOrgEx(s_hdc, &p);
if (curwin != NULL)
if (mouse_pos)
{
int mx, my;
gui_mch_getmouse(&mx, &my);
p.x += mx;
p.y += my;
}
else if (curwin != NULL)
{
p.x += TEXT_X(W_WINCOL(curwin) + curwin->w_wcol + 1);
p.y += TEXT_Y(W_WINROW(curwin) + curwin->w_wrow + 1);