fix(prompt): prompt preview padding
All checks were successful
Publish Docker Images / coverage-and-sonar (push) Successful in 20m43s
All checks were successful
Publish Docker Images / coverage-and-sonar (push) Successful in 20m43s
This commit is contained in:
@@ -143,18 +143,11 @@ impl Prompter for RealPrompts {
|
||||
// Show preview
|
||||
println!();
|
||||
println!("📝 Commit Message Preview:");
|
||||
println!(
|
||||
"┌─────────────────────────────────────────────────────────────────────────────────────────────────┐"
|
||||
);
|
||||
println!("│ {}│", message);
|
||||
println!("┌────────────────────────────────────────────────────────────────────────┐");
|
||||
// Pad with spaces to fill the box
|
||||
let padding = 72_usize.saturating_sub(message.chars().count());
|
||||
if padding > 0 {
|
||||
println!("│{:padding$}│", "");
|
||||
}
|
||||
println!(
|
||||
"└─────────────────────────────────────────────────────────────────────────────────────────────────┘"
|
||||
);
|
||||
let padding = 72_usize.saturating_sub(message.chars().count()) - 1;
|
||||
println!("│ {message}{:padding$}│", "");
|
||||
println!("└────────────────────────────────────────────────────────────────────────┘");
|
||||
println!();
|
||||
|
||||
// Get confirmation
|
||||
|
||||
Reference in New Issue
Block a user