diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2019-09-02 04:38:50 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-09-01 19:38:50 -0700 |
commit | fb19aeeb33f76cd3b2fec9f62a22e01c212fb076 (patch) | |
tree | 84d9f5fa59467b71c9a236469cb4c96912138c1c /test/functional/eval/buf_functions_spec.lua | |
parent | b10d703213da5699a176c7791a51a322f248dbd2 (diff) | |
download | rneovim-fb19aeeb33f76cd3b2fec9f62a22e01c212fb076.tar.gz rneovim-fb19aeeb33f76cd3b2fec9f62a22e01c212fb076.tar.bz2 rneovim-fb19aeeb33f76cd3b2fec9f62a22e01c212fb076.zip |
API: make nvim_win_set_option() set window-global, not buffer-local #9110
NB: the `!(flags & SOPT_GLOBAL)` exception is for 'statusline'.
Because `:set statusline=...` sets the global value for _all_ windows,
`:setlocal` is the best we can do there. This is a one-of-a-kind option
that doesn't work like any other option.
Diffstat (limited to 'test/functional/eval/buf_functions_spec.lua')
-rw-r--r-- | test/functional/eval/buf_functions_spec.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/eval/buf_functions_spec.lua b/test/functional/eval/buf_functions_spec.lua index c0e264d4c9..380ccfb5d5 100644 --- a/test/functional/eval/buf_functions_spec.lua +++ b/test/functional/eval/buf_functions_spec.lua @@ -228,9 +228,9 @@ describe('getbufvar() function', function() eq(0, funcs.getbufvar(1, '&g:number')) command('new') -- But with window-local options it probably does not what you expect - curwinmeths.set_option('number', true) + command("setl number") -- (note that current window’s buffer is 2, but getbufvar() receives 1) - eq(2, bufmeths.get_number(curwinmeths.get_buf())) + eq({id=2}, curwinmeths.get_buf()) eq(1, funcs.getbufvar(1, '&number')) eq(1, funcs.getbufvar(1, '&l:number')) -- You can get global value though, if you find this useful. |