neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 8ef464aeb40cf018d699144180a1406aa080ffb4
parent 0522dc35af3d9159300e64bea120000a7a26d044
Author: Lewis Russell <lewis6991@gmail.com>
Date:   Mon, 23 Jan 2023 10:05:36 +0000

refactor(optionstr.c): break up did_set_string_option 32

Diffstat:
Msrc/nvim/optionstr.c | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c @@ -711,6 +711,13 @@ static void did_set_highlight(char **varp, char **errmsg) } } +static void did_set_jumpoptions(char **errmsg) +{ + if (opt_strings_flags(p_jop, p_jop_values, &jop_flags, true) != OK) { + *errmsg = e_invarg; + } +} + static void did_set_background(char **errmsg) { if (check_opt_strings(p_bg, p_bg_values, false) != OK) { @@ -1392,9 +1399,7 @@ char *did_set_string_option(int opt_idx, char **varp, char *oldval, char *errbuf } else if (varp == &p_hl) { // 'highlight' did_set_highlight(varp, &errmsg); } else if (varp == &p_jop) { // 'jumpoptions' - if (opt_strings_flags(p_jop, p_jop_values, &jop_flags, true) != OK) { - errmsg = e_invarg; - } + did_set_jumpoptions(&errmsg); } else if (gvarp == &p_nf) { // 'nrformats' if (check_opt_strings(*varp, p_nf_values, true) != OK) { errmsg = e_invarg;