aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-08-22 13:56:50 +0800
committerGitHub <noreply@github.com>2022-08-22 13:56:50 +0800
commit2bed0d1d978b42184564201088ea5fef12ec8581 (patch)
treea6ad160916e751a71a39c44303bdf1a7e2616a31 /src/nvim/buffer.c
parentd4d27c41b3298c25ae62bc067472bef37bc61c99 (diff)
downloadrneovim-2bed0d1d978b42184564201088ea5fef12ec8581.tar.gz
rneovim-2bed0d1d978b42184564201088ea5fef12ec8581.tar.bz2
rneovim-2bed0d1d978b42184564201088ea5fef12ec8581.zip
vim-patch:8.2.4753: error from setting an option is silently ignored (#19888)
Problem: Error from setting an option is silently ignored. Solution: Handle option value errors better. Fix uses of N_(). https://github.com/vim/vim/commit/31e5c60a682840959cae6273ccadd9aae48c928d
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index ab5b32bf3e..15fdd977c1 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -4189,8 +4189,8 @@ void buf_open_scratch(handle_T bufnr, char *bufname)
apply_autocmds(EVENT_BUFFILEPRE, NULL, NULL, false, curbuf);
(void)setfname(curbuf, bufname, NULL, true);
apply_autocmds(EVENT_BUFFILEPOST, NULL, NULL, false, curbuf);
- set_option_value("bh", 0L, "hide", OPT_LOCAL);
- set_option_value("bt", 0L, "nofile", OPT_LOCAL);
- set_option_value("swf", 0L, NULL, OPT_LOCAL);
+ set_option_value_give_err("bh", 0L, "hide", OPT_LOCAL);
+ set_option_value_give_err("bt", 0L, "nofile", OPT_LOCAL);
+ set_option_value_give_err("swf", 0L, NULL, OPT_LOCAL);
RESET_BINDING(curwin);
}