Mercurial > vim
changeset 11490:6a06738f8948 v8.0.0628
patch 8.0.0628: cursor disappears after silent mapping
commit https://github.com/vim/vim/commit/f085f4266e07b36279c56d43fd0d73ed080046ae
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 7 20:39:47 2017 +0200
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 07 Jun 2017 20:45:03 +0200 |
parents | a7fa3a540af2 |
children | c7334ea3b492 |
files | src/getchar.c src/version.c |
diffstat | 2 files changed, 7 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/getchar.c +++ b/src/getchar.c @@ -2583,7 +2583,7 @@ vgetorpeek(int advance) * get a character: 3. from the user - handle <Esc> in Insert mode */ /* - * special case: if we get an <ESC> in insert mode and there + * Special case: if we get an <ESC> in insert mode and there * are no more characters at once, we pretend to go out of * insert mode. This prevents the one second delay after * typing an <ESC>. If we get something after all, we may @@ -2617,8 +2617,8 @@ vgetorpeek(int advance) mode_deleted = TRUE; } #ifdef FEAT_GUI - /* may show different cursor shape */ - if (gui.in_use) + /* may show a different cursor shape */ + if (gui.in_use && State != NORMAL && !cmd_silent) { int save_State; @@ -2913,16 +2913,8 @@ vgetorpeek(int advance) } #ifdef FEAT_GUI /* may unshow different cursor shape */ - if (gui.in_use) - { - if (cmd_silent) - gui_dont_update_cursor(TRUE); - else - gui_can_update_cursor(); - - if (shape_changed) - gui_update_cursor(TRUE, FALSE); - } + if (gui.in_use && shape_changed) + gui_update_cursor(TRUE, FALSE); #endif --vgetc_busy;