Mercurial > vim
diff src/crypt.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 | ef7d9789919d |
children | d0241e74bfdb |
line wrap: on
line diff
--- a/src/crypt.c +++ b/src/crypt.c @@ -752,7 +752,7 @@ crypt_check_swapfile_curbuf(void) // encryption uses padding and MAC, that does not work very well with // swap and undo files, so disable them mf_close_file(curbuf, TRUE); // remove the swap file - set_option_value((char_u *)"swf", 0, NULL, OPT_LOCAL); + set_option_value_give_err((char_u *)"swf", 0, NULL, OPT_LOCAL); msg_scroll = TRUE; msg(_("Note: Encryption of swapfile not supported, disabling swap file")); } @@ -807,7 +807,7 @@ crypt_get_key( if (store) { - set_option_value((char_u *)"key", 0L, p1, OPT_LOCAL); + set_option_value_give_err((char_u *)"key", 0L, p1, OPT_LOCAL); crypt_free_key(p1); p1 = curbuf->b_p_key; #ifdef FEAT_SODIUM