Problem: File name not displayed with ":file" when 'F' is in 'shortmess'.
Solution: Always display the file name when there is no argument (Christian
Brabandt, closes #3070)
{
if (rename_buffer(eap->arg) == FAIL)
return;
+ redraw_tabline = TRUE;
}
- /* print full file name if :cd used */
- if (!shortmess(SHM_FILEINFO))
+
+ // print file name if no argument or 'F' is not in 'shortmess'
+ if (*eap->arg == NUL || !shortmess(SHM_FILEINFO))
fileinfo(FALSE, FALSE, eap->forceit);
- redraw_tabline = TRUE;
}
/*
call assert_equal(4,&numberwidth)
bw!
endfunc
+
+func Test_shortmess_F()
+ new
+ call assert_match('\[No Name\]', execute('file'))
+ set shortmess+=F
+ call assert_match('\[No Name\]', execute('file'))
+ call assert_match('^\s*$', execute('file foo'))
+ call assert_match('foo', execute('file'))
+ set shortmess-=F
+ call assert_match('bar', execute('file bar'))
+ call assert_match('bar', execute('file'))
+ set shortmess&
+ bwipe
+endfunc
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 110,
/**/
109,
/**/