From f89381e05cb526739eac7a9d4db46752ef55f955 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 6 Jun 2025 06:36:33 +0800 Subject: [PATCH 1/2] vim-patch:9.1.1431: Hit-Enter Prompt when loading session files Problem: Hit-Enter Prompt when loading session files Solution: use set+= for 'shortmess' to keep the existing flags (Miguel Barro) closes: vim/vim#17445 https://github.com/vim/vim/commit/0ca59661966dc3e7e4ce5e266acbe1dc01dd8477 Co-authored-by: Miguel Barro --- src/nvim/ex_session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c index 60191a4bef..7eadd16132 100644 --- a/src/nvim/ex_session.c +++ b/src/nvim/ex_session.c @@ -645,9 +645,9 @@ static int makeopens(FILE *fd, char *dirnow) // 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(" set shortmess+=aoOA"); PUTLINE_FAIL("else"); - PUTLINE_FAIL(" set shortmess=aoO"); + PUTLINE_FAIL(" set shortmess+=aoO"); PUTLINE_FAIL("endif"); // Now save the current files, current buffer first. From 6171ab7f4ec6e7178157d534c611a7c98980cd56 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 6 Jun 2025 06:36:50 +0800 Subject: [PATCH 2/2] 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 https://github.com/vim/vim/commit/8f751d56f40b8b45b6d37c73c2c1abdda18c2d4c --- src/nvim/ex_session.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c index 7eadd16132..be97b8cbe1 100644 --- a/src/nvim/ex_session.c +++ b/src/nvim/ex_session.c @@ -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.