Skip to content

Commit

Permalink
Fix connect for empty hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
penumbra23 authored and quantumsheep committed Feb 21, 2022
1 parent db67f18 commit 00c5c0d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ui/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,11 @@ func NewHostsTable(app *tview.Application, sshConfigPath string, filter string,
row, _ := table.GetSelection()
hostname := table.GetCell(row, 0).Text

app.Stop()
connect(hostname, sshConfigPath)
// In case no host is selected
if len(hostname) > 0 {
app.Stop()
connect(hostname, sshConfigPath)
}
}

return event
Expand Down

0 comments on commit 00c5c0d

Please sign in to comment.