Skip to main content

render_tab_empty

Function render_tab_empty 

Source
pub fn render_tab_empty(frame: &mut Frame<'_>, area: Rect, e: &TabEmpty<'_>)
Expand description

Render an inner empty-state card centred horizontally inside area. Caller is responsible for the outer block (e.g. the existing main_block_line with the row-count title) — that outer frame is preserved so the empty state reads as a state OF the tab, not as a replacement screen.

Width: clamped to [40, 78] columns so the card never hugs the outer border on a 200-col terminal and never overflows on a narrow one. When area.width is below 44 the card collapses to a single 2-space-indented line via render_empty_with_hint using the first hint as the affordance — graceful degradation without a new code path on the caller side.