Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -920,6 +920,14 @@ pub struct Opt {
/// --max-line-distance=1.0 (this is more similar to `git --word-diff`).
pub tokenization_regex: String,

#[arg(long = "wrap-word-lookback", default_value = "0", value_name = "N")]
/// Prefer a word-friendly wrap point within the last N columns before the column boundary.
///
/// Within that window delta prefers whitespace, otherwise the nearest non-word character.
/// 0 (default) wraps exactly at the column boundary.
/// Has no effect unless delta is wrapping long lines (e.g. in side-by-side mode).
pub wrap_word_lookback: usize,

#[arg(long = "wrap-left-symbol", default_value = "↵", value_name = "STRING")]
/// End-of-line wrapped content symbol (left-aligned).
///
Expand Down
1 change: 1 addition & 0 deletions src/features/side_by_side.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ pub fn paint_minus_and_plus_lines_side_by_side(
// Calculated for syntect::highlighting::style::Style and delta::Style
wrap_minusplus_block(
config,
lines,
syntax_sections,
diff_sections,
&line_alignment,
Expand Down
1 change: 1 addition & 0 deletions src/options/set.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ pub fn set_options(
show_colors,
show_themes,
side_by_side,
wrap_word_lookback,
wrap_max_lines,
wrap_right_prefix_symbol,
wrap_right_percent,
Expand Down
Loading