diff options
author | Phelipe Teles <39670535+phelipetls@users.noreply.github.com> | 2023-09-16 19:35:12 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-17 06:35:12 +0800 |
commit | 4ab9c5fa46845807a2dc6dd91fc5fb78ccc70856 (patch) | |
tree | f5106e6f933bbb73ef42c3bdae9a23d99673eff4 /test/functional/lua/vim_spec.lua | |
parent | 054839437e63a7cc985e266052a1539c560a0682 (diff) | |
download | rneovim-4ab9c5fa46845807a2dc6dd91fc5fb78ccc70856.tar.gz rneovim-4ab9c5fa46845807a2dc6dd91fc5fb78ccc70856.tar.bz2 rneovim-4ab9c5fa46845807a2dc6dd91fc5fb78ccc70856.zip |
fix(lua): not using global value in vim.opt_global (#25196)
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r-- | test/functional/lua/vim_spec.lua | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index 9338e95d10..1dfb9a5e10 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -2257,8 +2257,8 @@ describe('lua stdlib', function() end) end) -- vim.opt - describe('opt_local', function() - it('should be able to append to an array list type option', function() + describe('vim.opt_local', function() + it('appends into global value when changing local option value', function() eq({ "foo,bar,baz,qux" }, exec_lua [[ local result = {} @@ -2273,6 +2273,19 @@ describe('lua stdlib', function() end) end) + describe('vim.opt_global', function() + it('gets current global option value', function() + eq({ "yes" }, exec_lua [[ + local result = {} + + vim.cmd "setglobal signcolumn=yes" + table.insert(result, vim.opt_global.signcolumn:get()) + + return result + ]]) + end) + end) + it('vim.cmd', function() exec_lua [[ vim.cmd "autocmd BufNew * ++once lua BUF = vim.fn.expand('<abuf>')" |