summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-04-15 13:53:33 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-15 13:53:33 +0100
commit31e5c60a682840959cae6273ccadd9aae48c928d (patch)
treea72168baa32f1899937f3937a41b0832eac66b8f /src/ex_cmds2.c
parent5dc294a7b63ed0e508dd360bc4d98173f1a1aeec (diff)
patch 8.2.4753: error from setting an option is silently ignoredv8.2.4753
Problem: Error from setting an option is silently ignored. Solution: Handle option value errors better. Fix uses of N_().
Diffstat (limited to 'src/ex_cmds2.c')
-rw-r--r--src/ex_cmds2.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c
index db82277aca..2de1798b18 100644
--- a/src/ex_cmds2.c
+++ b/src/ex_cmds2.c
@@ -563,9 +563,11 @@ ex_listdo(exarg_T *eap)
// Clear 'shm' to avoid that the file message overwrites
// any output from the command.
p_shm_save = vim_strsave(p_shm);
- set_option_value((char_u *)"shm", 0L, (char_u *)"", 0);
+ set_option_value_give_err((char_u *)"shm",
+ 0L, (char_u *)"", 0);
do_argfile(eap, i);
- set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
+ set_option_value_give_err((char_u *)"shm",
+ 0L, p_shm_save, 0);
vim_free(p_shm_save);
}
if (curwin->w_arg_idx != i)
@@ -623,9 +625,9 @@ ex_listdo(exarg_T *eap)
// Go to the next buffer. Clear 'shm' to avoid that the file
// message overwrites any output from the command.
p_shm_save = vim_strsave(p_shm);
- set_option_value((char_u *)"shm", 0L, (char_u *)"", 0);
+ set_option_value_give_err((char_u *)"shm", 0L, (char_u *)"", 0);
goto_buffer(eap, DOBUF_FIRST, FORWARD, next_fnum);
- set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
+ set_option_value_give_err((char_u *)"shm", 0L, p_shm_save, 0);
vim_free(p_shm_save);
// If autocommands took us elsewhere, quit here.
@@ -645,9 +647,9 @@ ex_listdo(exarg_T *eap)
// Clear 'shm' to avoid that the file message overwrites
// any output from the command.
p_shm_save = vim_strsave(p_shm);
- set_option_value((char_u *)"shm", 0L, (char_u *)"", 0);
+ set_option_value_give_err((char_u *)"shm", 0L, (char_u *)"", 0);
ex_cnext(eap);
- set_option_value((char_u *)"shm", 0L, p_shm_save, 0);
+ set_option_value_give_err((char_u *)"shm", 0L, p_shm_save, 0);
vim_free(p_shm_save);
// If jumping to the next quickfix entry fails, quit here