MCPcopy Create free account
hub / github.com/codehamr/codehamr / selectInitialIdx

Function selectInitialIdx

internal/tui/popover.go:93–100  ·  view source on GitHub ↗

selectInitialIdx picks the starting row: the current row (e.g. active profile), else the first.

(ms []argOption)

Source from the content-addressed store, hash-verified

91// selectInitialIdx picks the starting row: the current row (e.g. active
92// profile), else the first.
93func selectInitialIdx(ms []argOption) int {
94 for i, o := range ms {
95 if o.current {
96 return i
97 }
98 }
99 return 0
100}
101
102func (m *Model) closePopover() {
103 m.suggestOpen = false

Callers 1

setPopoverMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected