File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1391,7 +1391,7 @@ do_search(
13911391 // search stat. Use all the space available, so that the
13921392 // search state is right aligned. If there is not enough space
13931393 // msg_strtrunc() will shorten in the middle.
1394- if (msg_scrolled != 0 || cmd_silent )
1394+ if (msg_scrolled != 0 && ! cmd_silent )
13951395 // Use all the columns.
13961396 len = (int )(Rows - msg_row ) * Columns - 1 ;
13971397 else
Original file line number Diff line number Diff line change @@ -160,7 +160,28 @@ func! Test_search_stat()
160160 let stat = ' \[1/2\]'
161161 call assert_notmatch (pat .. stat, g: a )
162162
163- " close the window
163+ " normal, n comes from a silent mapping
164+ " First test a normal mapping, then a silent mapping
165+ call cursor (1 ,1 )
166+ nnoremap n n
167+ let @/ = ' find this'
168+ let pat = ' /find this\s\+'
169+ let g: a = execute (' :unsilent :norm n' )
170+ let g: b = split (g: a , " \n " )[-1 ]
171+ let stat = ' \[1/2\]'
172+ call assert_match (pat .. stat, g: b )
173+ nnoremap <silent> n n
174+ call cursor (1 ,1 )
175+ let g: a = execute (' :unsilent :norm n' )
176+ let g: b = split (g: a , " \n " )[-1 ]
177+ let stat = ' \[1/2\]'
178+ call assert_notmatch (pat .. stat, g: b )
179+ call assert_match (stat, g: b )
180+ unmap n
181+
182+ " Clean up
164183 set shortmess += S
184+
185+ " close the window
165186 bwipe!
166187endfunc
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+ 1970 ,
764766/**/
765767 1969 ,
766768/**/
You can’t perform that action at this time.
0 commit comments