From 9bd7b4cb01035dbf4d067307f9ffc469be23f9af Mon Sep 17 00:00:00 2001 From: Ralph Azucena Date: Mon, 21 Apr 2025 05:59:40 -0700 Subject: [PATCH] focus... --- lua/config/keymaps.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index d132805..0e110b3 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -60,7 +60,12 @@ vim.keymap.set('n', 'tt', vim.fn.setreg("+", "bundle exec rspec " .. vim.fn.expand("%")) local opts = { cwd = LazyVim.root(), interactive = true } local term, _ = Snacks.terminal.get(nil, opts) - if term and term.closed == true then - Snacks.terminal(nil, opts) + + if term then + if term.closed == true then + Snacks.terminal(nil, opts) + else + term:focus() + end end end, { silent = true, desc = "Toggle Test Terminal" })