From 0991c84de5ab9a4bc8dc94e1b68b3ee732a67c59 Mon Sep 17 00:00:00 2001 From: Mark Date: Mon, 28 Aug 2023 01:04:01 +0200 Subject: [PATCH] fixed bug where error lines would be 1 character too long --- src/run.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/run.rs b/src/run.rs index 142aac7..8019ee0 100755 --- a/src/run.rs +++ b/src/run.rs @@ -468,7 +468,8 @@ impl TuiFile { text_charlen -= 1; } text.push_str(" - Err: "); - text_charlen += 8; + // make text_charlen 1 too large (for the endchar) + text_charlen += 9; for ch in e.chars() { if ch == '\n' || ch == '\r' { continue; @@ -479,8 +480,6 @@ impl TuiFile { text_charlen += 1; text.push(ch); } - // make text_charlen 1 too large (for the endchar) - text_charlen += 1; while text_charlen < share.size.0 as _ { text.push(' '); text_charlen += 1;