diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-07-08 22:19:11 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-07-08 22:19:11 +0000 |
commit | ec8a10a4e4ae394dfe33c8135ad38cb7bcd2762b (patch) | |
tree | 653cd9e0d650502860fd9ecd3ea16735b17e1041 /src/gui_w16.c | |
parent | 97409f12619b8b2af6237327fdc17ed53037b4f2 (diff) | |
download | vim-git-ec8a10a4e4ae394dfe33c8135ad38cb7bcd2762b.tar.gz |
updated for version 7.0105
Diffstat (limited to 'src/gui_w16.c')
-rw-r--r-- | src/gui_w16.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/gui_w16.c b/src/gui_w16.c index 497033642..2452ce360 100644 --- a/src/gui_w16.c +++ b/src/gui_w16.c @@ -802,7 +802,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); @@ -814,10 +814,18 @@ gui_make_popup(char_u *path_name) temp_p = GetDCOrg(s_hdc); p.x = LOWORD(temp_p); p.y = HIWORD(temp_p); - if (curwin!=NULL) + if (mouse_pos) { - p.x+= TEXT_X(W_WINCOL(curwin) + curwin->w_wcol +1); - p.y+= TEXT_Y(W_WINROW(curwin) + curwin->w_wrow +1); + 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); } msg_scroll = FALSE; gui_mch_show_popupmenu_at(menu, (int)p.x, (int)p.y); |