diff --git a/lua/neotest/consumers/output.lua b/lua/neotest/consumers/output.lua index 2926a630..03ac5a89 100644 --- a/lua/neotest/consumers/output.lua +++ b/lua/neotest/consumers/output.lua @@ -80,7 +80,7 @@ local function open_output(result, opts) if opts.enter then vim.api.nvim_set_current_win(win) - else + elseif cur_win ~= vim.api.nvim_get_current_win() then vim.api.nvim_set_current_win(cur_win) end