summaryrefslogtreecommitdiffstats
path: root/src/gui_gtk.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-04-05 18:20:45 +0200
committerBram Moolenaar <Bram@vim.org>2021-04-05 18:20:45 +0200
commit01ac0a1f664c5b1ffd5c9ef196d4b47edf2fd494 (patch)
tree4c5cd1a9ba6672d70686136ab98a76a3bbd83b24 /src/gui_gtk.c
parente42939af87be3adad8c08ceb454e3a31114d7165 (diff)
patch 8.2.2720: GTK menu tooltip moves the cursorv8.2.2720
Problem: GTK menu tooltip moves the cursor. Solution: Position the cursor after displaying the tooltip. Do not show the tooltip when editing the command line.
Diffstat (limited to 'src/gui_gtk.c')
-rw-r--r--src/gui_gtk.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gui_gtk.c b/src/gui_gtk.c
index 3c435f9609..77076fcbeb 100644
--- a/src/gui_gtk.c
+++ b/src/gui_gtk.c
@@ -691,17 +691,23 @@ menu_item_select(GtkWidget *widget UNUSED, gpointer data)
char_u *tooltip;
static int did_msg = FALSE;
+ if (State & CMDLINE)
+ return;
menu = (vimmenu_T *)data;
tooltip = CONVERT_TO_UTF8(menu->strings[MENU_INDEX_TIP]);
if (tooltip != NULL && utf_valid_string(tooltip, NULL))
{
msg((char *)tooltip);
did_msg = TRUE;
+ setcursor();
+ out_flush_cursor(TRUE, FALSE);
}
else if (did_msg)
{
msg("");
did_msg = FALSE;
+ setcursor();
+ out_flush_cursor(TRUE, FALSE);
}
CONVERT_TO_UTF8_FREE(tooltip);
}