Skip to content

Commit f085f42

Browse files
committed
patch 8.0.0628: cursor disappears after silent mapping
Problem: Cursor disappears after silent mapping. (Ramel Eshed) Solution: Do restore the cursor when it was changed, but don't change it in the first place for a silent mapping.
1 parent add8dce commit f085f42

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

src/getchar.c

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2583,7 +2583,7 @@ vgetorpeek(int advance)
25832583
* get a character: 3. from the user - handle <Esc> in Insert mode
25842584
*/
25852585
/*
2586-
* special case: if we get an <ESC> in insert mode and there
2586+
* Special case: if we get an <ESC> in insert mode and there
25872587
* are no more characters at once, we pretend to go out of
25882588
* insert mode. This prevents the one second delay after
25892589
* typing an <ESC>. If we get something after all, we may
@@ -2617,8 +2617,8 @@ vgetorpeek(int advance)
26172617
mode_deleted = TRUE;
26182618
}
26192619
#ifdef FEAT_GUI
2620-
/* may show different cursor shape */
2621-
if (gui.in_use)
2620+
/* may show a different cursor shape */
2621+
if (gui.in_use && State != NORMAL && !cmd_silent)
26222622
{
26232623
int save_State;
26242624

@@ -2913,16 +2913,8 @@ vgetorpeek(int advance)
29132913
}
29142914
#ifdef FEAT_GUI
29152915
/* may unshow different cursor shape */
2916-
if (gui.in_use)
2917-
{
2918-
if (cmd_silent)
2919-
gui_dont_update_cursor(TRUE);
2920-
else
2921-
gui_can_update_cursor();
2922-
2923-
if (shape_changed)
2924-
gui_update_cursor(TRUE, FALSE);
2925-
}
2916+
if (gui.in_use && shape_changed)
2917+
gui_update_cursor(TRUE, FALSE);
29262918
#endif
29272919

29282920
--vgetc_busy;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ static char *(features[]) =
764764

765765
static int included_patches[] =
766766
{ /* Add new patch number below this line */
767+
/**/
768+
628,
767769
/**/
768770
627,
769771
/**/

0 commit comments

Comments
 (0)