From bbbfa55d850f1aaa6707ea85fb5230ac866459c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=B3n=C3=A1n=20Carrigan?= Date: Mon, 13 Mar 2023 19:40:34 +0000 Subject: [PATCH] fix(output): only set current win when needed Prevents issues with cmdheight being changed See #219 --- lua/neotest/consumers/output.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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