summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ex_cmds.c7
-rw-r--r--src/testdir/test_options.vim14
-rw-r--r--src/version.c2
3 files changed, 20 insertions, 3 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 53334342c..2ed2bdb4d 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3094,11 +3094,12 @@ ex_file(exarg_T *eap)
{
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;
}
/*
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
index 167cb1ce0..460a569f5 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -400,3 +400,17 @@ func Test_copy_winopt()
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
diff --git a/src/version.c b/src/version.c
index 00f3c0df6..b539e9eb2 100644
--- a/src/version.c
+++ b/src/version.c
@@ -790,6 +790,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 110,
+/**/
109,
/**/
108,