From 2470bad1151fc49941c3821f187c6c232c0cec78 Mon Sep 17 00:00:00 2001 From: Daniil Rozanov Date: Wed, 24 Apr 2024 04:14:52 +0300 Subject: feat: handle focus option --- lua/cmake/config.lua | 2 +- lua/cmake/terminal.lua | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/cmake/config.lua b/lua/cmake/config.lua index 3ce4f98..0e3a641 100644 --- a/lua/cmake/config.lua +++ b/lua/cmake/config.lua @@ -35,7 +35,7 @@ local default_config = { close_on_exit = false, hidden = false, clear_env = false, - focus = true, + focus = false, }, notification = { after = "success", diff --git a/lua/cmake/terminal.lua b/lua/cmake/terminal.lua index e086644..9ba8cb1 100644 --- a/lua/cmake/terminal.lua +++ b/lua/cmake/terminal.lua @@ -83,11 +83,8 @@ M.target_execute = function(command, opts) runnable:open() end vim.notify(vim.inspect(command), vim.log.levels.INFO) - if command.cd then - runnable:send("cd " .. command.cd) - end if command.cmd then - runnable:send(command.cmd) + runnable:send(command.cmd, not config.runner_terminal.focus) end end -- cgit v1.2.3