diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-06 15:06:22 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-06 15:06:22 +0200 |
| commit | 1530bf2856bbb32a6e0457596b55c07f3836a0ec (patch) | |
| tree | d699766a2607042de0f8278652b9b7cde2426b84 /internal/tui/flamegraph/model.go | |
| parent | 4737786fd4a417ff94e22e4f72a1e924d4e033dd (diff) | |
flamegraph: use full viewport with capped bar height and preserve footer/status
Diffstat (limited to 'internal/tui/flamegraph/model.go')
| -rw-r--r-- | internal/tui/flamegraph/model.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/internal/tui/flamegraph/model.go b/internal/tui/flamegraph/model.go index 2f40a30..2b974fe 100644 --- a/internal/tui/flamegraph/model.go +++ b/internal/tui/flamegraph/model.go @@ -284,7 +284,16 @@ func (m Model) ConsumesKey(msg tea.KeyPressMsg) bool { // View renders the flamegraph viewport. func (m Model) View() tea.View { - content := RenderTerminalView(m.frames, m.width, m.height, m.selectedIdx, m.subtreeSet, m.matchIndices, m.filterVisible, m.globalTotal, m.isDark, m.searchActive, m.searchQuery) + extraLines := 1 // selection status line + if m.showHelp { + extraLines++ + } + renderHeight := m.height - extraLines + if renderHeight < 3 { + renderHeight = 3 + } + + content := RenderTerminalView(m.frames, m.width, renderHeight, m.selectedIdx, m.subtreeSet, m.matchIndices, m.filterVisible, m.globalTotal, m.isDark, m.searchActive, m.searchQuery) content = replaceHeaderLine(content, m.toolbarLine()) if m.searchActive { content = replaceFooterLine(content, m.searchFooter()) |
