mirror of
https://github.com/neovim/neovim.git
synced 2025-11-04 09:44:31 +00:00
Synchronize shada reset helper with other functional tests
This commit is contained in:
@@ -59,6 +59,9 @@ end
|
|||||||
local session, loop_running, last_error
|
local session, loop_running, last_error
|
||||||
|
|
||||||
local function set_session(s)
|
local function set_session(s)
|
||||||
|
if session then
|
||||||
|
session:exit(0)
|
||||||
|
end
|
||||||
session = s
|
session = s
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -218,15 +221,12 @@ local function spawn(argv, merge)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function clear(extra_cmd)
|
local function clear(extra_cmd)
|
||||||
if session then
|
|
||||||
session:exit(0)
|
|
||||||
end
|
|
||||||
local args = {unpack(nvim_argv)}
|
local args = {unpack(nvim_argv)}
|
||||||
if extra_cmd ~= nil then
|
if extra_cmd ~= nil then
|
||||||
table.insert(args, '--cmd')
|
table.insert(args, '--cmd')
|
||||||
table.insert(args, extra_cmd)
|
table.insert(args, extra_cmd)
|
||||||
end
|
end
|
||||||
session = spawn(args)
|
set_session(spawn(args))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function insert(...)
|
local function insert(...)
|
||||||
|
|||||||
@@ -20,14 +20,8 @@ local function nvim_argv()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local session = nil
|
|
||||||
|
|
||||||
local reset = function()
|
local reset = function()
|
||||||
if session then
|
set_session(spawn(nvim_argv()))
|
||||||
session:exit(0)
|
|
||||||
end
|
|
||||||
session = spawn(nvim_argv())
|
|
||||||
set_session(session)
|
|
||||||
meths.set_var('tmpname', tmpname)
|
meths.set_var('tmpname', tmpname)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user