mirror of
https://github.com/neovim/neovim.git
synced 2025-09-22 11:18:19 +00:00
Revert "vim-patch:8.1.1192: mode is not cleared when leaving Insert mode with mapped Esc"
This reverts commit44bb7147e4
. Avoid regression mentioned inc64cce906e (commitcomment-45554271)
This commit is contained in:
@@ -620,7 +620,7 @@ int update_screen(int type)
|
||||
|
||||
/* Clear or redraw the command line. Done last, because scrolling may
|
||||
* mess up the command line. */
|
||||
if (clear_cmdline || redraw_cmdline || redraw_mode) {
|
||||
if (clear_cmdline || redraw_cmdline) {
|
||||
showmode();
|
||||
}
|
||||
|
||||
@@ -6569,7 +6569,7 @@ bool skip_showmode(void)
|
||||
|| msg_silent != 0
|
||||
|| !redrawing()
|
||||
|| (char_avail() && !KeyTyped)) {
|
||||
redraw_mode = true; // show mode later
|
||||
redraw_cmdline = true; // show mode later
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -6580,7 +6580,6 @@ bool skip_showmode(void)
|
||||
// If clear_cmdline is TRUE, clear the rest of the cmdline.
|
||||
// If clear_cmdline is FALSE there may be a message there that needs to be
|
||||
// cleared only if a mode is shown.
|
||||
// If redraw_mode is true show or clear the mode.
|
||||
// Return the length of the message (0 if no message).
|
||||
int showmode(void)
|
||||
{
|
||||
@@ -6727,11 +6726,10 @@ int showmode(void)
|
||||
need_clear = true;
|
||||
}
|
||||
|
||||
mode_displayed = true;
|
||||
if (need_clear || clear_cmdline || redraw_mode) {
|
||||
mode_displayed = TRUE;
|
||||
if (need_clear || clear_cmdline)
|
||||
msg_clr_eos();
|
||||
}
|
||||
msg_didout = false; // overwrite this message
|
||||
msg_didout = FALSE; /* overwrite this message */
|
||||
length = msg_col;
|
||||
msg_col = 0;
|
||||
msg_no_more = false;
|
||||
@@ -6740,9 +6738,6 @@ int showmode(void)
|
||||
} else if (clear_cmdline && msg_silent == 0) {
|
||||
// Clear the whole command line. Will reset "clear_cmdline".
|
||||
msg_clr_cmdline();
|
||||
} else if (redraw_mode) {
|
||||
msg_pos_mode();
|
||||
msg_clr_eos();
|
||||
}
|
||||
|
||||
// NB: also handles clearing the showmode if it was emtpy or disabled
|
||||
@@ -6759,7 +6754,6 @@ int showmode(void)
|
||||
win_redr_ruler(last, true);
|
||||
}
|
||||
redraw_cmdline = false;
|
||||
redraw_mode = false;
|
||||
clear_cmdline = false;
|
||||
|
||||
return length;
|
||||
|
Reference in New Issue
Block a user