diff options
author | Lewis Russell <lewis6991@gmail.com> | 2023-07-13 12:00:06 +0100 |
---|---|---|
committer | Lewis Russell <lewis6991@gmail.com> | 2023-08-31 15:08:50 +0100 |
commit | 9edd0f077eacde69512dcfbe8b58312036d02be4 (patch) | |
tree | 86f0cdfdea096565a2717ab6baa896eaa158280a | |
parent | 9a6b399cadef1cf5cd65851f76c9cf600b7e0aa1 (diff) | |
download | rneovim-9edd0f077eacde69512dcfbe8b58312036d02be4.tar.gz rneovim-9edd0f077eacde69512dcfbe8b58312036d02be4.tar.bz2 rneovim-9edd0f077eacde69512dcfbe8b58312036d02be4.zip |
refactor(option): remove hidden option check
-rw-r--r-- | src/nvim/optionstr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/optionstr.c b/src/nvim/optionstr.c index f82919d77a..26a5ed8563 100644 --- a/src/nvim/optionstr.c +++ b/src/nvim/optionstr.c @@ -419,7 +419,9 @@ void set_string_option_direct_in_buf(buf_T *buf, const char *name, int opt_idx, curbuf = save_curbuf; unblock_autocmds(); } + /// Set a string option to a new value, handling the effects +/// Must not be called with a hidden option! /// /// @param[in] opt_idx Option to set. /// @param[in] value New value. @@ -433,10 +435,6 @@ const char *set_string_option(const int opt_idx, const char *const value, const { vimoption_T *opt = get_option(opt_idx); - if (opt->var == NULL) { // don't set hidden option - return NULL; - } - char **const varp = (char **)get_varp_scope(opt, ((opt_flags & (OPT_LOCAL | OPT_GLOBAL)) == 0 ? ((opt->indir & PV_BOTH) ? OPT_GLOBAL : OPT_LOCAL) |