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)
aaadb5b6f7

Use readfile() with "B" flag in test as readblob() needs patch 8.2.2343.
This commit is contained in:
zeertzjq
2022-05-20 07:20:38 +08:00
committed by GitHub
parent 69853a622a
commit eb0aa8bb0e
2 changed files with 31 additions and 2 deletions

View File

@@ -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).