(width, height int)
| 40 | } |
| 41 | |
| 42 | func NewHistoryView(width, height int) *HistoryView { |
| 43 | return &HistoryView{ |
| 44 | ActiveSection: HistorySectionContent, |
| 45 | listVisible: 10, // sensible default before first render |
| 46 | Width: width, |
| 47 | Height: height, |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | // clampListOffset ensures ListOffset keeps Selected in the visible window. |
| 52 | // It uses the listVisible value set during the last Render(). |