Mercurial > vim
diff src/screen.c @ 8817:b7eb7bbd71d0 v7.4.1696
commit https://github.com/vim/vim/commit/fd773e9e88add7d1ffef890fb9f3a00d613b4326
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Apr 2 19:39:16 2016 +0200
patch 7.4.1696
Problem: When using :stopinsert in a silent mapping the "INSERT" message
isn't cleared. (Coacher)
Solution: Always clear the message. (Christian Brabandt, closes https://github.com/vim/vim/issues/718)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 02 Apr 2016 19:45:04 +0200 |
parents | 24b43dd167eb |
children | a1132255e3e1 |
line wrap: on
line diff
--- a/src/screen.c +++ b/src/screen.c @@ -10184,12 +10184,19 @@ unshowmode(int force) if (!redrawing() || (!force && char_avail() && !KeyTyped)) redraw_cmdline = TRUE; /* delete mode later */ else - { - msg_pos_mode(); - if (Recording) - recording_mode(hl_attr(HLF_CM)); - msg_clr_eos(); - } + clearmode(); +} + +/* + * Clear the mode message. + */ + void +clearmode() +{ + msg_pos_mode(); + if (Recording) + recording_mode(hl_attr(HLF_CM)); + msg_clr_eos(); } static void