diff options
author | erw7 <erw7.github@gmail.com> | 2020-03-20 03:31:10 +0900 |
---|---|---|
committer | erw7 <erw7.github@gmail.com> | 2020-03-21 18:06:59 +0900 |
commit | 9333f86ab7d0e85d9f658bfe455860771de9b997 (patch) | |
tree | 3ec96439c76f26f48623757030095d27e95be13b /test/functional/ui/options_spec.lua | |
parent | 87d892afa0475644e91d9c8a57b7c35491c4dc32 (diff) | |
download | rneovim-9333f86ab7d0e85d9f658bfe455860771de9b997.tar.gz rneovim-9333f86ab7d0e85d9f658bfe455860771de9b997.tar.bz2 rneovim-9333f86ab7d0e85d9f658bfe455860771de9b997.zip |
TUI: do not use "nvim_get_option" in tui thread
Since "nvim_get_option" is executed on the tui thread as a C function
instead of msgpack-rpc, it accesses global variables that may change on the
main thread.
Diffstat (limited to 'test/functional/ui/options_spec.lua')
-rw-r--r-- | test/functional/ui/options_spec.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/ui/options_spec.lua b/test/functional/ui/options_spec.lua index 581e196bbb..9646c3fdad 100644 --- a/test/functional/ui/options_spec.lua +++ b/test/functional/ui/options_spec.lua @@ -20,6 +20,8 @@ describe('UI receives option updates', function() pumblend=0, showtabline=1, termguicolors=false, + ttimeout=true, + ttimeoutlen=50, ext_cmdline=false, ext_popupmenu=false, ext_tabline=false, @@ -108,6 +110,18 @@ describe('UI receives option updates', function() eq(expected, screen.options) end) + command("set nottimeout") + expected.ttimeout = false + screen:expect(function() + eq(expected, screen.options) + end) + + command("set ttimeoutlen=100") + expected.ttimeoutlen = 100 + screen:expect(function() + eq(expected, screen.options) + end) + command("set all&") screen:expect(function() eq(defaults, screen.options) |