# HG changeset patch # User Bram Moolenaar # Date 1617640204 -7200 # Node ID db86c2b0d5c67da508daab2c9fca026a0298c196 # Parent 33c9ef35e4060428944c70b3c233603d5266b177 patch 8.2.2720: GTK menu tooltip moves the cursor Commit: https://github.com/vim/vim/commit/01ac0a1f664c5b1ffd5c9ef196d4b47edf2fd494 Author: Bram Moolenaar Date: Mon Apr 5 18:20:45 2021 +0200 patch 8.2.2720: GTK menu tooltip moves the cursor 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. diff --git a/src/gui_gtk.c b/src/gui_gtk.c --- a/src/gui_gtk.c +++ b/src/gui_gtk.c @@ -691,17 +691,23 @@ menu_item_select(GtkWidget *widget UNUSE 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); } diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2720, +/**/ 2719, /**/ 2718,