src/nvim/screen.c
/// Delete mode message.  Used when ESC is typed which is expected to end
/// Insert mode (but Insert mode didn't end yet!).
/// Caller should check "mode_displayed".
Delete mode message.  Used when ESC is typed which is expected to end
Insert mode (but Insert mode didn't end yet!).
Caller should check "mode_displayed".
Delete mode message . Used when ESC is typed which is expected to end Insert mode ( but Insert mode didn ' t end yet! ) . Caller should check " mode_displayed " .
void unshowmode(bool force)
{
  if (!redrawing() || (!force && char_avail() && !KeyTyped)) {
    redraw_cmdline = true;  
  } else {
    clearmode();
  }
}
void unshowmode ( bool force ) { if ( ! redrawing ( ) || ( ! force && char_avail ( ) && ! KeyTyped ) ) { redraw_cmdline = true ; } else { clearmode ( ) ; } }
Delete mode message.
Delete mode message .
// Don't delete it right now, when not redrawing or inside a mapping. // delete mode later