aboutsummaryrefslogtreecommitdiff
path: root/src/ui/status.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-05-20 22:03:49 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-05-20 22:08:26 +0300
commitdf357b250c0fcf4edf2681d4f114e199afb51899 (patch)
treeeba744d9238057e8758e2098670e0561d920d998 /src/ui/status.rs
parentc584037c77c63f6a08f8837f357c89432b8043e7 (diff)
fix: clarify keybinding conflict warnings
refs #154
Diffstat (limited to 'src/ui/status.rs')
-rw-r--r--src/ui/status.rs41
1 files changed, 22 insertions, 19 deletions
diff --git a/src/ui/status.rs b/src/ui/status.rs
index bb506da6..28f5d17b 100644
--- a/src/ui/status.rs
+++ b/src/ui/status.rs
@@ -75,26 +75,29 @@ pub(super) fn render_toast_notification(
}
pub(super) fn render_config_diagnostic(frame: &mut Frame, area: Rect, message: &str, p: &Palette) {
- let text = format!(" config warning: {message} ");
- let width = text.len() as u16 + 2;
- let notif_area = Rect::new(
- area.x + area.width.saturating_sub(width.min(area.width)),
- area.y,
- width.min(area.width),
- 1,
- );
+ let style = Style::default()
+ .fg(panel_contrast_fg(p))
+ .bg(p.yellow)
+ .add_modifier(Modifier::BOLD);
- frame.render_widget(Clear, notif_area);
- frame.render_widget(
- Paragraph::new(Span::styled(
- text,
- Style::default()
- .fg(panel_contrast_fg(p))
- .bg(p.yellow)
- .add_modifier(Modifier::BOLD),
- )),
- notif_area,
- );
+ for (row, line) in message
+ .lines()
+ .filter(|line| !line.trim().is_empty())
+ .take(area.height as usize)
+ .enumerate()
+ {
+ let text = format!(" config warning: {line} ");
+ let width = (text.len() as u16).min(area.width);
+ let notif_area = Rect::new(
+ area.x + area.width.saturating_sub(width),
+ area.y + row as u16,
+ width,
+ 1,
+ );
+
+ frame.render_widget(Clear, notif_area);
+ frame.render_widget(Paragraph::new(Span::styled(text, style)), notif_area);
+ }
}
pub(super) fn state_dot(state: AgentState, seen: bool, p: &Palette) -> (&'static str, Style) {