Fix tab replacement in single-column display

Fixes #617
pull/619/head
Wilfred Hughes 2024-01-07 19:35:33 +07:00
parent 8ad07174c9
commit 2d61aefb84
2 changed files with 6 additions and 3 deletions

@ -8,6 +8,9 @@ Added support for Objective-C.
The default display width for tabs has changed to 4.
Fixed an issue where difftastic would sometimes output literal tabs
rather than respecting the display width for tabs.
## 0.54 (released 7th January 2024)
### Parsing

@ -14,8 +14,8 @@ use crate::{
display::context::all_matched_lines_filled,
display::hunks::{matched_lines_indexes_for_hunk, Hunk},
display::style::{
self, apply_colors, apply_line_number_color, color_positions, novel_style, split_and_apply,
BackgroundColor,
self, apply_colors, apply_line_number_color, color_positions, novel_style, replace_tabs,
split_and_apply, BackgroundColor,
},
hash::DftHashMap,
lines::format_line_num,
@ -102,7 +102,7 @@ fn display_single_column(
.style(style)
.to_string(),
);
formatted_line.push_str(line);
formatted_line.push_str(&replace_tabs(line, display_options.tab_width));
formatted_lines.push(formatted_line);
}