aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-09-22 18:53:16 +0200
committerGitHub <noreply@github.com>2018-09-22 18:53:16 +0200
commit2b06c32a230d4e2791952be82bf345c5d2da343d (patch)
tree7b729f46a574b9847b428b589d56241af6d8f4d3 /src/nvim/memline.c
parentc236e80cf3dfae6df5c43ecfb19c7629c9884f7b (diff)
parent28b5a637b57040c0e045cb2ad57bdfbd3881c8cb (diff)
downloadrneovim-2b06c32a230d4e2791952be82bf345c5d2da343d.tar.gz
rneovim-2b06c32a230d4e2791952be82bf345c5d2da343d.tar.bz2
rneovim-2b06c32a230d4e2791952be82bf345c5d2da343d.zip
Merge #8898 from justinmk/vim-8.1.0310
vim-patch:8.1.0310: file info msg with 'F' in 'shortmess'
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r--src/nvim/memline.c20
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;
}
/*