summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2005-07-08 22:19:11 +0000
committerBram Moolenaar <Bram@vim.org>2005-07-08 22:19:11 +0000
commitec8a10a4e4ae394dfe33c8135ad38cb7bcd2762b (patch)
tree653cd9e0d650502860fd9ecd3ea16735b17e1041 /src
parent97409f12619b8b2af6237327fdc17ed53037b4f2 (diff)
downloadvim-ec8a10a4e4ae394dfe33c8135ad38cb7bcd2762b.zip
updated for version 7.0105
Diffstat (limited to 'src')
-rw-r--r--src/gui_w16.c16
-rw-r--r--src/proto/gui_kde.pro2
2 files changed, 13 insertions, 5 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);
diff --git a/src/proto/gui_kde.pro b/src/proto/gui_kde.pro
index 50671f44e..a72b358d4 100644
--- a/src/proto/gui_kde.pro
+++ b/src/proto/gui_kde.pro
@@ -15,5 +15,5 @@ void gui_mch_show_popupmenu __ARGS((vimmenu_T *menu));
void gui_mch_find_dialog __ARGS((exarg_T *eap));
void gui_mch_replace_dialog __ARGS((exarg_T *eap));
void ex_helpfind __ARGS((exarg_T *eap));
-void gui_make_popup __ARGS((char_u *path_name));
+void gui_make_popup __ARGS((char_u *path_name, int mouse_pos));
/* vim: set ft=cpp : */