From 10dd5083122cca5c16d71984cdaefdad45fa59fc Mon Sep 17 00:00:00 2001 From: Gianluca Piccirillo Date: Sun, 16 Jun 2024 14:24:21 -0400 Subject: [PATCH] fix: tmux focused in standalone (#161) --- pkg/ui/main_view.go | 1 - pkg/ui/tmux_session_view.go | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/ui/main_view.go b/pkg/ui/main_view.go index ca2a1b1..002846a 100644 --- a/pkg/ui/main_view.go +++ b/pkg/ui/main_view.go @@ -86,7 +86,6 @@ func (mv *MainView) Render(ui *UI) error { cwd, _ := os.Getwd() if homeDir == cwd { mv.tmv.standalone = true - return nil } GetDialog[*ConfirmationDialog](ui).Open(func(b bool) { diff --git a/pkg/ui/tmux_session_view.go b/pkg/ui/tmux_session_view.go index 8891ae3..e32bd96 100644 --- a/pkg/ui/tmux_session_view.go +++ b/pkg/ui/tmux_session_view.go @@ -150,6 +150,10 @@ func (tv *TmuxSessionView) Init(ui *UI) { ui.FocusPortView() } }) + + if tv.standalone { + FocusView(tv.Name()) + } } func (tv *TmuxSessionView) getSelectedSession() *api.TmuxSession {