fix(prompt): prompt preview padding

This commit is contained in:
2026-03-09 22:17:58 +01:00
parent e4df40cf63
commit 30527a73e0

View File

@@ -143,18 +143,11 @@ impl Prompter for RealPrompts {
// Show preview // Show preview
println!(); println!();
println!("📝 Commit Message Preview:"); println!("📝 Commit Message Preview:");
println!( println!("┌────────────────────────────────────────────────────────────────────────┐");
"┌─────────────────────────────────────────────────────────────────────────────────────────────────┐"
);
println!("{}", message);
// Pad with spaces to fill the box // Pad with spaces to fill the box
let padding = 72_usize.saturating_sub(message.chars().count()); let padding = 72_usize.saturating_sub(message.chars().count()) - 1;
if padding > 0 { println!("{message}{:padding$}", "");
println!("{:padding$}", ""); println!("└────────────────────────────────────────────────────────────────────────┘");
}
println!(
"└─────────────────────────────────────────────────────────────────────────────────────────────────┘"
);
println!(); println!();
// Get confirmation // Get confirmation