From efbc33cbbc030df3478d051502d1c14c1c73b3df Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 24 Aug 2018 10:34:48 +0200 Subject: vim-patch:8.1.0310: file info msg 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 vim/vim#3221) https://github.com/vim/vim/commit/2f0f871159b2cba862fcd41edab65b17da75c422 ref #8840 ref #9027 --- src/nvim/buffer.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/nvim/buffer.c') diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 6735ae696f..a28d9774ab 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -884,7 +884,15 @@ void handle_swap_exists(bufref_T *old_curbuf) 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; + if (old_tw != curbuf->b_p_tw) { check_colorcolumn(curwin); } -- cgit