diff options
author | Famiu Haque <famiuhaque@proton.me> | 2024-11-04 19:00:12 +0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-04 05:00:12 -0800 |
commit | a27419f3fc540f66567f4559a796cd6758f1bb1f (patch) | |
tree | ff8d1f00c01bb391facba5d239a58eb5aa07eb44 /test/old/testdir/test_compiler.vim | |
parent | 04d178053fee7be92c8a7634a1acfe373c758638 (diff) | |
download | rneovim-a27419f3fc540f66567f4559a796cd6758f1bb1f.tar.gz rneovim-a27419f3fc540f66567f4559a796cd6758f1bb1f.tar.bz2 rneovim-a27419f3fc540f66567f4559a796cd6758f1bb1f.zip |
feat(options)!: disallow setting hidden options #28400
Problem:
There are three different ways of marking an option as hidden, `enable_if
= false`, `hidden = true` and `immutable = true`. These also have different
behaviors. Options hidden with `enable_if = false` can't have their value
fetched using Vim script or the API, but options hidden with `hidden = true` or
`immutable = true` can. On the other hand, options with `hidden = true` do not
error when trying to set their value, but options with `immutable = true` do.
Solution:
Remove `enable_if = false`, remove the `hidden` property for options, and use
`immutable = true` to mark an option as hidden instead. Also make hidden option
variable pointers always point to the default value, which allows fetching the
value of every hidden option using Vim script and the API. This does also mean
that trying to set a hidden option will now give an error instead of just being
ignored.
Diffstat (limited to 'test/old/testdir/test_compiler.vim')
-rw-r--r-- | test/old/testdir/test_compiler.vim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/old/testdir/test_compiler.vim b/test/old/testdir/test_compiler.vim index 69420b4b7f..07b57b76d9 100644 --- a/test/old/testdir/test_compiler.vim +++ b/test/old/testdir/test_compiler.vim @@ -10,9 +10,12 @@ func Test_compiler() let save_LC_ALL = $LC_ALL let $LC_ALL= "C" - " %:S does not work properly with 'shellslash' set let save_shellslash = &shellslash - set noshellslash + " Nvim doesn't allow setting value of a hidden option to non-default value + if exists('+shellslash') + " %:S does not work properly with 'shellslash' set + set noshellslash + endif e Xfoo.pl compiler perl |