]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1433: Unnecessary :if when writing session v9.1.1433
authorzeertzjq <zeertzjq@outlook.com>
Thu, 5 Jun 2025 18:25:51 +0000 (20:25 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 5 Jun 2025 18:25:51 +0000 (20:25 +0200)
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>
src/session.c
src/version.c

index 6696e3cfa01cc59f8d723df218d84867e67e7eab..8dd0bc3642e29db1d0281e8023ad1e0ab71d33f9 100644 (file)
@@ -680,17 +680,13 @@ makeopens(
     if (put_line(fd, "endif") == FAIL)
        goto fail;
 
-    // save 'shortmess' if not storing options
+    // Save 'shortmess' if not storing options.
     if ((ssop_flags & SSOP_OPTIONS) == 0
            && put_line(fd, "let s:shortmess_save = &shortmess") == FAIL)
        goto fail;
 
-    // set 'shortmess' for the following.  Add the 'A' flag if it was there
-    if (put_line(fd, "if &shortmess =~ 'A'") == 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)
+    // Set 'shortmess' for the following.
+    if (put_line(fd, "set shortmess+=aoO") == FAIL)
        goto fail;
 
     // Now save the current files, current buffer first.
index 684b3bc0a9cac61a4eee2d28f0da3d1a1da1304a..ccf24302f6d9e1216edceadb2d4e79ad8d425ccd 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1433,
 /**/
     1432,
 /**/