neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 6171ab7f4ec6e7178157d534c611a7c98980cd56
parent f89381e05cb526739eac7a9d4db46752ef55f955
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Fri,  6 Jun 2025 06:36:50 +0800

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

Diffstat:
Msrc/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 @@ -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.