mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
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()`.
This commit is contained in:

committed by
Lewis Russell

parent
b2d471ab33
commit
9ae7d36ff5
@@ -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");
|
||||
|
Reference in New Issue
Block a user