From b1783c4e6ae2efa4c5f21de77e9313d130f4e8b2 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Thu, 2 Oct 2025 01:36:41 +0100 Subject: [PATCH] Add comment clarifying . line number rendering rationale --- src/display/side_by_side.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/display/side_by_side.rs b/src/display/side_by_side.rs index e1aa6d9e9..4027223bd 100644 --- a/src/display/side_by_side.rs +++ b/src/display/side_by_side.rs @@ -57,6 +57,13 @@ fn format_missing_line_num( let num_digits = prev_num.display().len(); format!( "{:>width$} ", + // If there are further lines in this file, we want to use + // . (i.e. dot), but if we've already shown the last line we + // just render whitespace. + // + // We also want to show dots when we're rendering a + // continuation line, i.e. the content line is so long we need + // to wrap it. (if after_end { " " } else { "." }).repeat(num_digits), width = column_width - 1 )