Skip to content

Commit

Permalink
Clarify name
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Oct 21, 2024
1 parent 8cdb59f commit 8b2b94a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/display/side_by_side.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fn display_line_nums(
struct SourceDimensions {
/// The number of characters used to display source lines. Any
/// line that exceeds this length will be wrapped.
content_width: usize,
content_display_width: usize,
/// The number of characters required to display line numbers on
/// the LHS.
lhs_line_nums_width: usize,
Expand Down Expand Up @@ -213,7 +213,7 @@ impl SourceDimensions {
let content_width = min(lhs_content_width, rhs_content_width);

Self {
content_width,
content_display_width: content_width,
lhs_line_nums_width,
rhs_line_nums_width,
lhs_max_line,
Expand Down Expand Up @@ -521,17 +521,17 @@ pub(crate) fn print(
let lhs_line = match lhs_line_num {
Some(lhs_line_num) => split_and_apply(
lhs_lines[lhs_line_num.as_usize()],
source_dims.content_width,
source_dims.content_display_width,
display_options.tab_width,
lhs_highlights.get(lhs_line_num).unwrap_or(&vec![]),
Side::Left,
),
None => vec![" ".repeat(source_dims.content_width)],
None => vec![" ".repeat(source_dims.content_display_width)],
};
let rhs_line = match rhs_line_num {
Some(rhs_line_num) => split_and_apply(
rhs_lines[rhs_line_num.as_usize()],
source_dims.content_width,
source_dims.content_display_width,
display_options.tab_width,
rhs_highlights.get(rhs_line_num).unwrap_or(&vec![]),
Side::Right,
Expand All @@ -544,7 +544,7 @@ pub(crate) fn print(
.enumerate()
{
let lhs_line =
lhs_line.unwrap_or_else(|| " ".repeat(source_dims.content_width));
lhs_line.unwrap_or_else(|| " ".repeat(source_dims.content_display_width));
let rhs_line = rhs_line.unwrap_or_else(|| "".into());
let lhs_num: String = if i == 0 {
display_lhs_line_num.clone()
Expand Down

0 comments on commit 8b2b94a

Please sign in to comment.