patch 8.1.1334: when buffer is hidden "F" in 'shortmess' is not used

Problem:    When buffer is hidden "F" in 'shortmess' is not used.
Solution:   Check the "F" flag in 'shortmess' when the buffer is already
            loaded. (Jason Franklin)  Add test_getvalue() to be able to test
            this.
diff --git a/src/buffer.c b/src/buffer.c
index e825a99..e103684 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1742,9 +1742,12 @@
     }
     else
     {
-	if (!msg_silent)
-	    need_fileinfo = TRUE;	/* display file info after redraw */
-	(void)buf_check_timestamp(curbuf, FALSE); /* check if file changed */
+	if (!msg_silent && !shortmess(SHM_FILEINFO))
+	    need_fileinfo = TRUE;	// display file info after redraw
+
+	// check if file changed
+	(void)buf_check_timestamp(curbuf, FALSE);
+
 	curwin->w_topline = 1;
 #ifdef FEAT_DIFF
 	curwin->w_topfill = 0;