SetApp sets the parent app reference for focus management.
(app *App)
| 47 | |
| 48 | // SetApp sets the parent app reference for focus management. |
| 49 | func (nl *NodeList) SetApp(app *App) { |
| 50 | nl.app = app |
| 51 | |
| 52 | // Set up input capture for arrow keys and VI-like navigation (hjkl) |
| 53 | navigationCapture := createNavigationInputCapture(nl.app, nil, nl.app.nodeDetails) |
| 54 | var pendingG bool |
| 55 | nl.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { |
| 56 | if handleVimTopBottomRune(event, &pendingG, func() { |
| 57 | jumpListTop(nl.List) |
| 58 | }, func() { |
| 59 | jumpListBottom(nl.List) |
| 60 | }) { |
| 61 | return nil |
| 62 | } |
| 63 | return navigationCapture(event) |
| 64 | }) |
| 65 | } |
| 66 | |
| 67 | // SetNodes updates the list with the provided nodes. |
| 68 | func (nl *NodeList) SetNodes(nodes []*api.Node) { |
nothing calls this directly
no test coverage detected