Mercurial > vim
diff src/ex_getln.c @ 28457:4dcccb2673fe v8.2.4753
patch 8.2.4753: error from setting an option is silently ignored
Commit: https://github.com/vim/vim/commit/31e5c60a682840959cae6273ccadd9aae48c928d
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 15 13:53:33 2022 +0100
patch 8.2.4753: error from setting an option is silently ignored
Problem: Error from setting an option is silently ignored.
Solution: Handle option value errors better. Fix uses of N_().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 15 Apr 2022 15:00:04 +0200 |
parents | d1702731786c |
children | 060fc3b69697 |
line wrap: on
line diff
--- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4367,7 +4367,8 @@ open_cmdwin(void) apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, FALSE, curbuf); (void)setfname(curbuf, (char_u *)_("[Command Line]"), NULL, TRUE); apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, FALSE, curbuf); - set_option_value((char_u *)"bt", 0L, (char_u *)"nofile", OPT_LOCAL); + set_option_value_give_err((char_u *)"bt", + 0L, (char_u *)"nofile", OPT_LOCAL); curbuf->b_p_ma = TRUE; #ifdef FEAT_FOLDING curwin->w_p_fen = FALSE; @@ -4392,7 +4393,8 @@ open_cmdwin(void) add_map((char_u *)"<buffer> <Tab> <C-X><C-V>", INSERT); add_map((char_u *)"<buffer> <Tab> a<C-X><C-V>", NORMAL); } - set_option_value((char_u *)"ft", 0L, (char_u *)"vim", OPT_LOCAL); + set_option_value_give_err((char_u *)"ft", + 0L, (char_u *)"vim", OPT_LOCAL); } --curbuf_lock;