From f8e2d1d0892311a56b86378c3728531fc678a94d Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Wed, 4 Mar 2026 16:36:44 -0500 Subject: [PATCH] fix(compiler): open quickfix in background, retain focus on source buffer --- lua/preview/compiler.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/preview/compiler.lua b/lua/preview/compiler.lua index 3f897ad..63df152 100644 --- a/lua/preview/compiler.lua +++ b/lua/preview/compiler.lua @@ -177,7 +177,8 @@ function M.compile(bufnr, name, provider, ctx, opts) }) end vim.fn.setqflist(items, 'r') - vim.cmd('copen') + vim.cmd.copen() + vim.cmd.wincmd('p') end end end @@ -215,7 +216,8 @@ function M.compile(bufnr, name, provider, ctx, opts) }) end vim.fn.setqflist(items, 'r') - vim.cmd('copen') + vim.cmd.copen() + vim.cmd.wincmd('p') end end end @@ -372,7 +374,8 @@ function M.compile(bufnr, name, provider, ctx, opts) }) end vim.fn.setqflist(items, 'r') - vim.cmd('copen') + vim.cmd.copen() + vim.cmd.wincmd('p') end end end