1
0
forked from aniani/vim

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_().
This commit is contained in:
Bram Moolenaar
2022-04-15 13:53:33 +01:00
parent 5dc294a7b6
commit 31e5c60a68
31 changed files with 155 additions and 116 deletions

View File

@@ -1965,7 +1965,7 @@ count_syllables(slang_T *slang, char_u *word)
/*
* Parse 'spelllang' and set w_s->b_langp accordingly.
* Returns NULL if it's OK, an error message otherwise.
* Returns NULL if it's OK, an untranslated error message otherwise.
*/
char *
did_set_spelllang(win_T *wp)
@@ -3834,8 +3834,8 @@ ex_spelldump(exarg_T *eap)
do_cmdline_cmd((char_u *)"new");
// enable spelling locally in the new window
set_option_value((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
set_option_value((char_u*)"spl", dummy, spl, OPT_LOCAL);
set_option_value_give_err((char_u*)"spell", TRUE, (char_u*)"", OPT_LOCAL);
set_option_value_give_err((char_u*)"spl", dummy, spl, OPT_LOCAL);
vim_free(spl);
if (!BUFEMPTY())