vim-patch:8.2.4753: error from setting an option is silently ignored (#19888)

Problem:    Error from setting an option is silently ignored.
Solution:   Handle option value errors better.  Fix uses of N_().
31e5c60a68
This commit is contained in:
zeertzjq
2022-08-22 13:56:50 +08:00
committed by GitHub
parent d4d27c41b3
commit 2bed0d1d97
20 changed files with 112 additions and 83 deletions

View File

@@ -4189,8 +4189,8 @@ void buf_open_scratch(handle_T bufnr, char *bufname)
apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, false, curbuf);
(void)setfname(curbuf, bufname, NULL, true);
apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, false, curbuf);
set_option_value("bh", 0L, "hide", OPT_LOCAL);
set_option_value("bt", 0L, "nofile", OPT_LOCAL);
set_option_value("swf", 0L, NULL, OPT_LOCAL);
set_option_value_give_err("bh", 0L, "hide", OPT_LOCAL);
set_option_value_give_err("bt", 0L, "nofile", OPT_LOCAL);
set_option_value_give_err("swf", 0L, NULL, OPT_LOCAL);
RESET_BINDING(curwin);
}