(594c741) Measure heading rules on the displayed name

Section rules repeated the character for the byte length of the whole heading
line, so every rule ran three past its heading for the "## " prefix. The title
rule in cmd_show used byte length, which over-draws for a non-ASCII title.

Both now count characters of the text as displayed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ansho Rei
2026-08-20 17:11:43 +02:00
co-authored by Claude Opus 5
parent ab1dae098c
commit 8b440593e2
2 changed files with 25 additions and 4 deletions
+2 -1
View File
@@ -295,7 +295,8 @@ pub fn cmd_show(search: &str, worklane_dir: &Path) -> Result<()> {
let ticket_uuid = parse_ticket_field(&content, "ID");
println!("{}", title);
println!("{}", "─".repeat(title.len()));
// In characters, so a non-ASCII title is not over-drawn.
println!("{}", "─".repeat(title.chars().count()));
println!("\n{}", content_trim_colored(&content));
if ticket_uuid != "_Not set_" {