Skip to content

Commit fd773e9

Browse files
committed
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 #718)
1 parent 8bc189e commit fd773e9

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

src/ex_docmd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10040,6 +10040,7 @@ ex_stopinsert(exarg_T *eap UNUSED)
1004010040
{
1004110041
restart_edit = 0;
1004210042
stop_insert_mode = TRUE;
10043+
clearmode();
1004310044
}
1004410045

1004510046
/*

src/proto/screen.pro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ int screen_ins_lines(int off, int row, int line_count, int end, win_T *wp);
4747
int screen_del_lines(int off, int row, int line_count, int end, int force, win_T *wp);
4848
int showmode(void);
4949
void unshowmode(int force);
50+
void clearmode(void);
5051
void get_trans_bufname(buf_T *buf);
5152
int redrawing(void);
5253
int messaging(void);

src/screen.c

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10184,12 +10184,19 @@ unshowmode(int force)
1018410184
if (!redrawing() || (!force && char_avail() && !KeyTyped))
1018510185
redraw_cmdline = TRUE; /* delete mode later */
1018610186
else
10187-
{
10188-
msg_pos_mode();
10189-
if (Recording)
10190-
recording_mode(hl_attr(HLF_CM));
10191-
msg_clr_eos();
10192-
}
10187+
clearmode();
10188+
}
10189+
10190+
/*
10191+
* Clear the mode message.
10192+
*/
10193+
void
10194+
clearmode()
10195+
{
10196+
msg_pos_mode();
10197+
if (Recording)
10198+
recording_mode(hl_attr(HLF_CM));
10199+
msg_clr_eos();
1019310200
}
1019410201

1019510202
static void

src/version.c

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

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1696,
751753
/**/
752754
1695,
753755
/**/

0 commit comments

Comments
 (0)