mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:23:33 +00:00
fix(tui/history): avoid bolding very short commands
This commit is contained in:
@@ -5640,10 +5640,14 @@ fn emphasize_shell_command_name(line: &mut Line<'static>) {
|
||||
rebuilt.push(Span::styled(before.to_string(), style));
|
||||
}
|
||||
|
||||
let bright_style = style
|
||||
.fg(crate::colors::text_bright())
|
||||
.add_modifier(Modifier::BOLD);
|
||||
rebuilt.push(Span::styled(token.to_string(), bright_style));
|
||||
if token.chars().count() <= 4 {
|
||||
rebuilt.push(Span::styled(token.to_string(), style));
|
||||
} else {
|
||||
let bright_style = style
|
||||
.fg(crate::colors::text_bright())
|
||||
.add_modifier(Modifier::BOLD);
|
||||
rebuilt.push(Span::styled(token.to_string(), bright_style));
|
||||
}
|
||||
|
||||
if !after.is_empty() {
|
||||
rebuilt.push(Span::styled(after.to_string(), style));
|
||||
|
||||
Reference in New Issue
Block a user