mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user