popoverHeight is the rows the popover occupies in View(): 0 when closed, capped at popoverCap to leave the viewport breathing room.
()
| 110 | // popoverHeight is the rows the popover occupies in View(): 0 when closed, |
| 111 | // capped at popoverCap to leave the viewport breathing room. |
| 112 | func (m Model) popoverHeight() int { |
| 113 | if !m.suggestOpen { |
| 114 | return 0 |
| 115 | } |
| 116 | return min(len(m.suggest), popoverCap) |
| 117 | } |
| 118 | |
| 119 | // renderPopover draws the suggestion list: value flush left, description right |
| 120 | // aligned, one row each. Selection is a colour change (stylePopoverSelected); |
no outgoing calls
no test coverage detected