fix(prompt): prompt preview padding
All checks were successful
Publish Docker Images / coverage-and-sonar (push) Successful in 18m44s
All checks were successful
Publish Docker Images / coverage-and-sonar (push) Successful in 18m44s
This commit is contained in:
@@ -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());
|
||||||
if padding > 0 {
|
println!("│ {message}{:padding$}│", "");
|
||||||
println!("│{:padding$}│", "");
|
println!("└─────────────────────────────────────────────────────────────────────────┘");
|
||||||
}
|
|
||||||
println!(
|
|
||||||
"└─────────────────────────────────────────────────────────────────────────────────────────────────┘"
|
|
||||||
);
|
|
||||||
println!();
|
println!();
|
||||||
|
|
||||||
// Get confirmation
|
// Get confirmation
|
||||||
|
|||||||
Reference in New Issue
Block a user