patch 9.1.1433: Unnecessary :if when writing session

Commit: 
https://github.com/vim/vim/commit/8f751d56f40b8b45b6d37c73c2c1abdda18c2d4c
Author: zeertzjq <zeert...@outlook.com>
Date:   Thu Jun 5 20:25:51 2025 +0200

    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 <zeert...@outlook.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/session.c b/src/session.c
index 6696e3cfa..8dd0bc364 100644
--- a/src/session.c
+++ b/src/session.c
@@ -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.
diff --git a/src/version.c b/src/version.c
index 684b3bc0a..ccf24302f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1433,
 /**/
     1432,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1uNFLp-001wyT-Q7%40256bit.org.

Raspunde prin e-mail lui