Update Lua test runner

This commit is contained in:
Rob Watson 2021-07-21 11:30:46 +02:00
parent 1ab2be14c4
commit b15bae5b4d
1 changed files with 2 additions and 2 deletions

4
nvimrc
View File

@ -215,9 +215,9 @@ _G.run_tests = function()
vim.api.nvim_command([[silent up]])
-- TODO: check that it is not the current window, if the window has a non-term buffer
local winid = _G._test_cmd_to_wins[cmd]
if winid == nil or not vim.api.nvim_win_is_valid(winid) or not vim.call("win_gotoid", winid) == -1 then
local current_winid = vim.call("win_getid")
if winid == nil or not vim.api.nvim_win_is_valid(winid) or winid == current_winid or not vim.call("win_gotoid", winid) == -1 then
vim.api.nvim_command([[10split]])
winid = vim.call("win_getid")
_G._test_cmd_to_wins[cmd] = winid