(title, pane, text string, height int)
| 1053 | } |
| 1054 | |
| 1055 | func (b *FullscreenRendererBackend) scrollTitle(title, pane, text string, height int) string { |
| 1056 | lines := splitNonEmptyViewportLines(text) |
| 1057 | if len(lines) <= maxInt(1, height) { |
| 1058 | return title |
| 1059 | } |
| 1060 | start := minInt(maxInt(0, b.PaneScrollOffsets[pane]), len(lines)) |
| 1061 | end := minInt(len(lines), start+maxInt(1, height)) |
| 1062 | return fmt.Sprintf("%s %d-%d/%d", title, start+1, end, len(lines)) |
| 1063 | } |
| 1064 | |
| 1065 | func (b *FullscreenRendererBackend) renderPanel(title, body, pane string, minBodyLines int) string { |
| 1066 | width := b.panelWidth() |
no test coverage detected