patch 8.1.0310: file info msg not always suppressed with 'F' in 'shortmess'
Problem: File info message not always suppressed with 'F' in 'shortmess'.
(Asheq Imran)
Solution: Save and restore msg_silent. (Christian Brabandt, closes #3221)
diff --git a/src/buffer.c b/src/buffer.c
index 6bcd28b..2ca131d 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1035,7 +1035,14 @@
buf = old_curbuf->br_buf;
if (buf != NULL)
{
+ int old_msg_silent = msg_silent;
+
+ if (shortmess(SHM_FILEINFO))
+ msg_silent = 1; // prevent fileinfo message
enter_buffer(buf);
+ // restore msg_silent, so that the command line will be shown
+ msg_silent = old_msg_silent;
+
# ifdef FEAT_SYN_HL
if (old_tw != curbuf->b_p_tw)
check_colorcolumn(curwin);