vim-patch:9.1.1433: Unnecessary :if when writing session

Problem:  Unnecessary :if in session where both branches have the same
          effect (after 9.1.1431).
Solution: Remove the superfluous :if (zeertzjq).

closes: vim/vim#17448

8f751d56f4
This commit is contained in:
zeertzjq
2025-06-06 06:36:50 +08:00
parent f89381e05c
commit 6171ab7f4e

View File

@ -638,17 +638,13 @@ static int makeopens(FILE *fd, char *dirnow)
return FAIL;
}
// save 'shortmess' if not storing options
// Save 'shortmess' if not storing options.
if ((ssop_flags & kOptSsopFlagOptions) == 0) {
PUTLINE_FAIL("let s:shortmess_save = &shortmess");
}
// 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");
// Set 'shortmess' for the following.
PUTLINE_FAIL("set shortmess+=aoO");
// Now save the current files, current buffer first.
// Put all buffers into the buffer list.