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_().
diff --git a/src/memline.c b/src/memline.c
index f38e029..e098aef 100644
--- a/src/memline.c
+++ b/src/memline.c
@@ -1482,7 +1482,7 @@
set_fileformat(b0_ff - 1, OPT_LOCAL);
if (b0_fenc != NULL)
{
- set_option_value((char_u *)"fenc", 0L, b0_fenc, OPT_LOCAL);
+ set_option_value_give_err((char_u *)"fenc", 0L, b0_fenc, OPT_LOCAL);
vim_free(b0_fenc);
}
unchanged(curbuf, TRUE, TRUE);
@@ -1759,7 +1759,7 @@
if (*buf->b_p_key != NUL && STRCMP(curbuf->b_p_key, buf->b_p_key) != 0)
{
msg_puts(_("Using crypt key from swap file for the text file.\n"));
- set_option_value((char_u *)"key", 0L, buf->b_p_key, OPT_LOCAL);
+ set_option_value_give_err((char_u *)"key", 0L, buf->b_p_key, OPT_LOCAL);
}
#endif
redraw_curbuf_later(NOT_VALID);