- commit
- 5651ec1
- parent
- c4c4e8b
- author
- Eric Bower
- date
- 2025-05-14 09:10:37 -0400 EDT
fix(tui): noop on tuns left pane when no tunnels found
1 files changed,
+4,
-0
+4,
-0
1@@ -273,6 +273,10 @@ func (m *TunsPage) HandleEvent(ev vaxis.Event, ph vxfw.EventPhase) (vxfw.Command
2 case vaxis.Key:
3 if msg.Matches(vaxis.KeyEnter) {
4 m.mu.Lock()
5+ cursor := int(m.leftPane.Cursor())
6+ if cursor >= len(m.tuns) {
7+ return nil, nil
8+ }
9 m.selected = m.tuns[m.leftPane.Cursor()].TunAddress
10 m.logs = []*ResultLog{}
11 m.eventLogs = []*db.TunsEventLog{}