diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-10-13 10:46:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 10:46:42 +0800 |
commit | 186c489fd6b1073feefef0e2c3774d908bd06615 (patch) | |
tree | 14f0615af4add0379696e1a5d4a2c5901501d92a /src/nvim/option.c | |
parent | 34c7007c32cd78b5589d72701c6669a2c378dd17 (diff) | |
parent | cd1e0bb87dc71d51d9e8da097f5822c37e909335 (diff) | |
download | rneovim-186c489fd6b1073feefef0e2c3774d908bd06615.tar.gz rneovim-186c489fd6b1073feefef0e2c3774d908bd06615.tar.bz2 rneovim-186c489fd6b1073feefef0e2c3774d908bd06615.zip |
Merge pull request #20629 from zeertzjq/vim-8.2.4453
vim-patch:8.2.{4453,4462}
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 3c3a69e063..11a92f7d56 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -3112,6 +3112,12 @@ void set_option_value_give_err(const char *name, long number, const char *string } } +bool is_option_allocated(const char *name) +{ + int idx = findoption(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) |