0
0
mirror of https://github.com/vim/vim.git synced 2025-07-04 23:07:33 -04:00

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: #17448

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
zeertzjq 2025-06-05 20:25:51 +02:00 committed by Christian Brabandt
parent 1cccdebc0f
commit 8f751d56f4
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 5 additions and 7 deletions

View File

@ -680,17 +680,13 @@ makeopens(
if (put_line(fd, "endif") == FAIL) if (put_line(fd, "endif") == FAIL)
goto fail; goto fail;
// save 'shortmess' if not storing options // Save 'shortmess' if not storing options.
if ((ssop_flags & SSOP_OPTIONS) == 0 if ((ssop_flags & SSOP_OPTIONS) == 0
&& put_line(fd, "let s:shortmess_save = &shortmess") == FAIL) && put_line(fd, "let s:shortmess_save = &shortmess") == FAIL)
goto fail; goto fail;
// set 'shortmess' for the following. Add the 'A' flag if it was there // Set 'shortmess' for the following.
if (put_line(fd, "if &shortmess =~ 'A'") == FAIL if (put_line(fd, "set shortmess+=aoO") == FAIL)
|| put_line(fd, " set shortmess+=aoOA") == FAIL
|| put_line(fd, "else") == FAIL
|| put_line(fd, " set shortmess+=aoO") == FAIL
|| put_line(fd, "endif") == FAIL)
goto fail; goto fail;
// Now save the current files, current buffer first. // Now save the current files, current buffer first.

View File

@ -709,6 +709,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1433,
/**/ /**/
1432, 1432,
/**/ /**/