diff options
author | Bram Moolenaar <Bram@vim.org> | 2005-07-08 22:25:33 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2005-07-08 22:25:33 +0000 |
commit | 045e82deef5c2eed3039e24f879a8169e4170a5f (patch) | |
tree | 306de7ed7831dd7c5b0cc6f471dfa4227c5a7940 /src/gui_w32.c | |
parent | 63b80986ace0e057922329ff6c31d37343529245 (diff) | |
download | vim-git-045e82deef5c2eed3039e24f879a8169e4170a5f.tar.gz |
updated for version 7.0105
Diffstat (limited to 'src/gui_w32.c')
-rw-r--r-- | src/gui_w32.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gui_w32.c b/src/gui_w32.c index c4d8e4841..11d0281a6 100644 --- a/src/gui_w32.c +++ b/src/gui_w32.c @@ -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); |