diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-15 08:05:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-15 08:05:26 +0800 |
commit | 78d77c03de579845fcaa761e7339c93fcd74efb2 (patch) | |
tree | 07372ce021e0aa7499f56d47a4391326aae05fe8 /src/nvim/option.c | |
parent | cf6cffda89ad0b22de0ddd4ca7abcb714da812d0 (diff) | |
download | rneovim-78d77c03de579845fcaa761e7339c93fcd74efb2.tar.gz rneovim-78d77c03de579845fcaa761e7339c93fcd74efb2.tar.bz2 rneovim-78d77c03de579845fcaa761e7339c93fcd74efb2.zip |
vim-patch:9.0.1631: passing wrong variable type to option gives multiple errors (#24026)
Problem: Passing a wrong variable type to an option gives multiple errors.
Solution: Bail out early on failure. (closes vim/vim#12504)
https://github.com/vim/vim/commit/4c7cb372c17a84c8a35254d93eb37cb854cd39da
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 073a1684fb..e65f33e828 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3787,14 +3787,6 @@ bool is_option_allocated(const char *name) return idx >= 0 && (options[idx].flags & P_ALLOCED); } -/// Return true if "name" is a string option. -/// Returns false if option "name" does not exist. -bool is_string_option(const char *name) -{ - int idx = findoption(name); - return idx >= 0 && (options[idx].flags & P_STRING); -} - // Translate a string like "t_xx", "<t_xx>" or "<S-Tab>" to a key number. // When "has_lt" is true there is a '<' before "*arg_arg". // Returns 0 when the key is not recognized. |