File tree Expand file tree Collapse file tree 3 files changed +29
-0
lines changed
Expand file tree Collapse file tree 3 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -10485,10 +10485,16 @@ unshowmode(int force)
1048510485 void
1048610486clearmode (void )
1048710487{
10488+ int save_msg_row = msg_row ;
10489+ int save_msg_col = msg_col ;
10490+
1048810491 msg_pos_mode ();
1048910492 if (Recording )
1049010493 recording_mode (HL_ATTR (HLF_CM ));
1049110494 msg_clr_eos ();
10495+
10496+ msg_col = save_msg_col ;
10497+ msg_row = save_msg_row ;
1049210498}
1049310499
1049410500 static void
Original file line number Diff line number Diff line change @@ -38,3 +38,24 @@ function Test_messages()
3838 let &more = oldmore
3939 endtry
4040endfunction
41+
42+ " Patch 7.4.1696 defined the "clearmode()" command for clearing the mode
43+ " indicator (e.g., "-- INSERT --") when ":stopinsert" is invoked. Message
44+ " output could then be disturbed when 'cmdheight' was greater than one.
45+ " This test ensures that the bugfix for this issue remains in place.
46+ function ! Test_stopinsert_does_not_break_message_output ()
47+ set cmdheight = 2
48+ redraw !
49+
50+ stopinsert | echo ' test echo'
51+ call assert_equal (116 , screenchar (&lines - 1 , 1 ))
52+ call assert_equal (32 , screenchar (&lines , 1 ))
53+ redraw !
54+
55+ stopinsert | echomsg ' test echomsg'
56+ call assert_equal (116 , screenchar (&lines - 1 , 1 ))
57+ call assert_equal (32 , screenchar (&lines , 1 ))
58+ redraw !
59+
60+ set cmdheight &
61+ endfunction
Original file line number Diff line number Diff line change @@ -761,6 +761,8 @@ static char *(features[]) =
761761
762762static int included_patches [] =
763763{ /* Add new patch number below this line */
764+ /**/
765+ 2 ,
764766/**/
765767 1 ,
766768/**/
You can’t perform that action at this time.
0 commit comments