feat: clear screen on SSH enter/exit, host list scrolling, 'e' edit key
- tea.Batch(tea.ClearScreen, sshConnectCmd) before SSH starts so TUI output doesn't bleed into SSH terminal - tea.ClearScreen after SSH exits so SSH output doesn't ghost in TUI - Host list now paginates: only (term_height - 8) / 5 cards shown, viewport follows selectedIndex with centered scrolling - Shows 'N of M hosts' indicator when content is clipped - Added 'e' key alias for editing host (Ctrl+E or E)
This commit is contained in:
+2
-2
@@ -62,13 +62,13 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
return m, tea.Quit
|
||||
|
||||
case sshConnectToMsg:
|
||||
return m, sshConnectCmd(msg.host, m.dataDir)
|
||||
return m, tea.Batch(tea.ClearScreen, sshConnectCmd(msg.host, m.dataDir))
|
||||
|
||||
case sshExitMsg:
|
||||
if msg.err != nil {
|
||||
m.Error = msg.err
|
||||
}
|
||||
return m, nil
|
||||
return m, tea.ClearScreen
|
||||
|
||||
case openHostFormMsg:
|
||||
var tab Tab
|
||||
|
||||
Reference in New Issue
Block a user