diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-20 07:20:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 07:20:38 +0800 |
commit | eb0aa8bb0ebc3cc233af6a5281c553d14ee57183 (patch) | |
tree | f1cb3d29d60412ef8d8a4baf6d5e9dad844779d7 /src/nvim/ex_session.c | |
parent | 69853a622a1fa9b920171657a255648e532bd444 (diff) | |
download | rneovim-eb0aa8bb0ebc3cc233af6a5281c553d14ee57183.tar.gz rneovim-eb0aa8bb0ebc3cc233af6a5281c553d14ee57183.tar.bz2 rneovim-eb0aa8bb0ebc3cc233af6a5281c553d14ee57183.zip |
vim-patch:8.2.4980: when 'shortmess' contains 'A' loading session may still warn (#18636)
Problem: When 'shortmess' contains 'A' loading a session may still warn for
an existing swap file. (Melker Österberg)
Solution: Keep the 'A' flag to 'shortmess' in the session file.
(closes vim/vim#10443)
https://github.com/vim/vim/commit/aaadb5b6f76ea03e5eb460121f3dbf46ad04ce50
Use readfile() with "B" flag in test as readblob() needs patch 8.2.2343.
Diffstat (limited to 'src/nvim/ex_session.c')
-rw-r--r-- | src/nvim/ex_session.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c index 7eef6707dd..dfdb8c1eac 100644 --- a/src/nvim/ex_session.c +++ b/src/nvim/ex_session.c @@ -598,9 +598,14 @@ static int makeopens(FILE *fd, char_u *dirnow) PUTLINE_FAIL("let s:shortmess_save = &shortmess"); } - // Now save the current files, current buffer first. - PUTLINE_FAIL("set shortmess=aoO"); + // set 'shortmess' for the following. Add the 'A' flag if it was there + PUTLINE_FAIL("if &shortmess =~ 'A'"); + PUTLINE_FAIL(" set shortmess=aoOA"); + PUTLINE_FAIL("else"); + PUTLINE_FAIL(" set shortmess=aoO"); + PUTLINE_FAIL("endif"); + // Now save the current files, current buffer first. // Put all buffers into the buffer list. // Do it very early to preserve buffer order after loading session (which // can be disrupted by prior `edit` or `tabedit` calls). |