aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/help.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-03-22 09:14:42 +0800
committerGitHub <noreply@github.com>2024-03-22 09:14:42 +0800
commitdc110cba3c0d48d7c9dbb91900f8be0cf6cf0c9b (patch)
treea534155ed127b0c6b4f22ea86150c4e0c045d62a /src/nvim/help.c
parent15c6909bb198ca8a1a22405a4a7e96357716e57e (diff)
parent58cc66ee1f066127c33157b91c64d9b125a96621 (diff)
downloadrneovim-dc110cba3c0d48d7c9dbb91900f8be0cf6cf0c9b.tar.gz
rneovim-dc110cba3c0d48d7c9dbb91900f8be0cf6cf0c9b.tar.bz2
rneovim-dc110cba3c0d48d7c9dbb91900f8be0cf6cf0c9b.zip
Merge pull request #26970 from famiu/refactor/options/set_option_direct
refactor(options): remove `set_string_option_direct()`
Diffstat (limited to 'src/nvim/help.c')
-rw-r--r--src/nvim/help.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/help.c b/src/nvim/help.c
index 779772cedf..e9f67ca3e4 100644
--- a/src/nvim/help.c
+++ b/src/nvim/help.c
@@ -613,7 +613,7 @@ void cleanup_help_tags(int num_file, char **file)
void prepare_help_buffer(void)
{
curbuf->b_help = true;
- set_string_option_direct(kOptBuftype, "help", OPT_LOCAL, 0);
+ set_option_direct(kOptBuftype, STATIC_CSTR_AS_OPTVAL("help"), OPT_LOCAL, 0);
// Always set these options after jumping to a help tag, because the
// user may have an autocommand that gets in the way.
@@ -622,13 +622,13 @@ void prepare_help_buffer(void)
// Only set it when needed, buf_init_chartab() is some work.
char *p = "!-~,^*,^|,^\",192-255";
if (strcmp(curbuf->b_p_isk, p) != 0) {
- set_string_option_direct(kOptIskeyword, p, OPT_LOCAL, 0);
+ set_option_direct(kOptIskeyword, CSTR_AS_OPTVAL(p), OPT_LOCAL, 0);
check_buf_options(curbuf);
buf_init_chartab(curbuf, false);
}
// Don't use the global foldmethod.
- set_string_option_direct(kOptFoldmethod, "manual", OPT_LOCAL, 0);
+ set_option_direct(kOptFoldmethod, STATIC_CSTR_AS_OPTVAL("manual"), OPT_LOCAL, 0);
curbuf->b_p_ts = 8; // 'tabstop' is 8.
curwin->w_p_list = false; // No list mode.