Diff
1diff --git a/tui/model.go b/tui/model.go
2index e29f72f5574a96cde86a196eead3488f5b3d5c66..5cc2ba86de05fd049030ac0628bc6b34973bb702 100644
3--- a/tui/model.go
4+++ b/tui/model.go
5@@ -25,11 +25,14 @@ func (e errMsg) Error() string {
6 }
7
8 func SessionHandler(s ssh.Session) tea.Model {
9- pty, changes, active := s.Pty()
10- if !active {
11- return nil
12+ if len(s.Command()) == 0 {
13+ pty, changes, active := s.Pty()
14+ if !active {
15+ return nil
16+ }
17+ return NewModel(pty.Window.Width, pty.Window.Height, changes)
18 }
19- return NewModel(pty.Window.Width, pty.Window.Height, changes)
20+ return nil
21 }
22
23 type Model struct {