From 811e256aa857b8e5a2e7b1f1fccb10036e8c0fb9 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Sun, 16 Nov 2025 01:03:10 +0000 Subject: [PATCH] Update comment now we have accurate content widths --- src/display/side_by_side.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/display/side_by_side.rs b/src/display/side_by_side.rs index caf1bb053..b9cce6245 100644 --- a/src/display/side_by_side.rs +++ b/src/display/side_by_side.rs @@ -199,14 +199,11 @@ impl SourceDimensions { // between LHS and RHS. // // Instead, cap the display width based on the maximum length - // of lines within the file. + // of visible lines within the file. // - // This is a crude heuristic because it ignores which lines of - // the file actually get displayed, so we can still end up - // with some superfluous space. It also naively assumes that - // byte length is the same display length, which is generally - // OK because byte length will tend to be larger than the - // display length. + // This naively assumes that byte length is the same as + // display length, which is generally OK because byte length + // will tend to be larger than the display length. let display_width = min(terminal_width, (content_max_width + 4) * 2 + SPACER.len()); assert!(