diff options
author | Famiu Haque <famiuhaque@proton.me> | 2023-12-07 00:40:48 +0600 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2023-12-07 19:36:34 +0000 |
commit | 9ae7d36ff5ebaf75597b442e10890bd77df01fbe (patch) | |
tree | 7211492e2fea8e9b87336c3ea69f4c5b2c0b8702 /src/nvim/spell.c | |
parent | b2d471ab337e56f660eb7c89ae24f447f7b7a165 (diff) | |
download | rneovim-9ae7d36ff5ebaf75597b442e10890bd77df01fbe.tar.gz rneovim-9ae7d36ff5ebaf75597b442e10890bd77df01fbe.tar.bz2 rneovim-9ae7d36ff5ebaf75597b442e10890bd77df01fbe.zip |
refactor(options): split `get_option_value()` into smaller functions
Problem: Currently, `get_option_value()` returns 3 separate things: The actual value of the option, whether the option is hidden, and the option flags. This makes the function difficult to refactor, modify or otherwise reason about.
Solution: Split `get_option_value()` into 3 functions, each with a single purpose. This also affects `get_option_value_for()`.
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 5065bee347..eb3bcec3ec 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -3218,7 +3218,7 @@ void ex_spelldump(exarg_T *eap) if (no_spell_checking(curwin)) { return; } - OptVal spl = get_option_value("spl", NULL, OPT_LOCAL, NULL); + OptVal spl = get_option_value(findoption("spl"), OPT_LOCAL); // Create a new empty buffer in a new window. do_cmdline_cmd("new"); |