aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorFamiu Haque <famiuhaque@proton.me>2024-03-27 14:37:50 +0600
committerLewis Russell <me@lewisr.dev>2024-03-27 09:27:16 +0000
commit63f7b1f31eae9e2710bd973f05a575f26e0208d9 (patch)
tree2953a5503d51f80eda7f639cc0ee18d85816bad7 /src/nvim/option.c
parent635fa2c51c1db604804bd7b9dbd818bb06677fde (diff)
downloadrneovim-63f7b1f31eae9e2710bd973f05a575f26e0208d9.tar.gz
rneovim-63f7b1f31eae9e2710bd973f05a575f26e0208d9.tar.bz2
rneovim-63f7b1f31eae9e2710bd973f05a575f26e0208d9.zip
refactor(options): swap `immutable` and `hidden` option property names
Ref: https://github.com/neovim/neovim/pull/28018#issuecomment-2021622120
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index e4f32ebec4..2c7922908c 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -3481,11 +3481,11 @@ static const char *did_set_option(OptIndex opt_idx, void *varp, OptVal old_value
.os_win = curwin
};
- if (direct || opt->immutable) {
- // Don't do any extra processing if setting directly or if option is immutable.
+ if (direct || opt->hidden) {
+ // Don't do any extra processing if setting directly or if option is hidden.
}
- // Disallow changing hidden options.
- else if (opt->hidden && !optval_equal(old_value, new_value)) {
+ // Disallow changing immutable options.
+ else if (opt->immutable && !optval_equal(old_value, new_value)) {
errmsg = e_unsupportedoption;
}
// Disallow changing some options from secure mode.
@@ -3509,9 +3509,9 @@ static const char *did_set_option(OptIndex opt_idx, void *varp, OptVal old_value
restore_chartab = did_set_cb_args.os_restore_chartab;
}
- // If option is immutable or if an error is detected, restore the previous value and don't do any
+ // If option is hidden or if an error is detected, restore the previous value and don't do any
// further processing.
- if (opt->immutable || errmsg != NULL) {
+ if (opt->hidden || errmsg != NULL) {
set_option_varp(opt_idx, varp, old_value, true);
// When resetting some values, need to act on it.
if (restore_chartab) {