mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
refactor(options): use hashy for finding options (#26573)
Problem: `findoption()` searches through the options[] table linearly for option names, even though hashy can be used to generate a compile-time hash table for it. Solution: Use hashy to generate a compile time hash table for finding options. This also allows handling option aliases, so we don't need separate options[] table entries for things like 'viminfo'.
This commit is contained in:
@@ -79,7 +79,7 @@ static int validate_option_value_args(Dict(option) *opts, char *name, OptIndex *
|
||||
return FAIL;
|
||||
});
|
||||
|
||||
*opt_idxp = findoption(name);
|
||||
*opt_idxp = find_option(name);
|
||||
int flags = get_option_attrs(*opt_idxp);
|
||||
if (flags == 0) {
|
||||
// hidden or unknown option
|
||||
|
Reference in New Issue
Block a user