diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-08-24 10:34:48 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2018-09-21 22:35:09 +0200 |
commit | efbc33cbbc030df3478d051502d1c14c1c73b3df (patch) | |
tree | b4788f26f3ff6e6bbd01075e0c7499dcc549878f /src/nvim/memline.c | |
parent | 4fa3492a6fcba4e58639ec1039b18e883576bdd3 (diff) | |
download | rneovim-efbc33cbbc030df3478d051502d1c14c1c73b3df.tar.gz rneovim-efbc33cbbc030df3478d051502d1c14c1c73b3df.tar.bz2 rneovim-efbc33cbbc030df3478d051502d1c14c1c73b3df.zip |
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
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r-- | src/nvim/memline.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c index e84b8d623d..5602a29f50 100644 --- a/src/nvim/memline.c +++ b/src/nvim/memline.c @@ -528,17 +528,19 @@ void ml_open_file(buf_T *buf) buf->b_may_swap = false; } -/* - * If still need to create a swap file, and starting to edit a not-readonly - * file, or reading into an existing buffer, create a swap file now. - */ -void -check_need_swap ( - int newfile /* reading file into new buffer */ -) +/// If still need to create a swap file, and starting to edit a not-readonly +/// file, or reading into an existing buffer, create a swap file now. +/// +/// @param newfile reading file into new buffer +void check_need_swap(int newfile) { - if (curbuf->b_may_swap && (!curbuf->b_p_ro || !newfile)) + int old_msg_silent = msg_silent; // might be reset by an E325 message + + if (curbuf->b_may_swap && (!curbuf->b_p_ro || !newfile)) { ml_open_file(curbuf); + } + + msg_silent = old_msg_silent; } /* |