Compare commits

...

1 Commits

Author SHA1 Message Date
easong-openai
0822686d5f add line spacing 2025-08-28 20:06:44 -07:00

View File

@@ -138,8 +138,7 @@ impl BottomPaneView for ListSelectionView {
fn desired_height(&self, _width: u16) -> u16 {
let rows = (self.items.len()).clamp(1, MAX_POPUP_ROWS);
// +1 for the title row, +1 for optional subtitle, +1 for optional footer
let mut height = rows as u16 + 1;
let mut height = rows as u16 + 2;
if self.subtitle.is_some() {
// +1 for subtitle, +1 for a blank spacer line beneath it
height = height.saturating_add(2);
@@ -155,13 +154,22 @@ impl BottomPaneView for ListSelectionView {
return;
}
let title_area = Rect {
let spacer_top = Rect {
x: area.x,
y: area.y,
width: area.width,
height: 1,
};
let _ = spacer_top; // keep explicit for clarity; no rendering here
let title_area = Rect {
x: area.x,
y: area.y.saturating_add(1),
width: area.width,
height: 1,
};
let title_spans: Vec<Span<'static>> = vec![
Self::dim_prefix_span(),
Span::styled(
@@ -172,7 +180,7 @@ impl BottomPaneView for ListSelectionView {
let title_para = Paragraph::new(Line::from(title_spans));
title_para.render(title_area, buf);
let mut next_y = area.y.saturating_add(1);
let mut next_y = area.y.saturating_add(2);
if let Some(sub) = &self.subtitle {
let subtitle_area = Rect {
x: area.x,