mirror of
https://github.com/neovim/neovim.git
synced 2025-11-23 10:36:29 +00:00
fix(rpc): ignore redraw events when not in UI client (#21892)
Otherwise it will crash.
This commit is contained in:
@@ -337,6 +337,21 @@ describe('server -> client', function()
|
||||
eq('localhost:', string.sub(address,1,10))
|
||||
connect_test(server, 'tcp', address)
|
||||
end)
|
||||
|
||||
it('does not crash on receiving UI events', function()
|
||||
local server = spawn(nvim_argv)
|
||||
set_session(server)
|
||||
local address = funcs.serverlist()[1]
|
||||
local client = spawn(nvim_argv, false, nil, true)
|
||||
set_session(client)
|
||||
|
||||
local id = funcs.sockconnect('pipe', address, {rpc=true})
|
||||
funcs.rpcrequest(id, 'nvim_ui_attach', 80, 24, {})
|
||||
assert_alive()
|
||||
|
||||
server:close()
|
||||
client:close()
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('connecting to its own pipe address', function()
|
||||
|
||||
Reference in New Issue
Block a user