Skip to content

Conversation

@th1000s
Copy link
Collaborator

@th1000s th1000s commented Dec 9, 2025

This changes

│ 10 │ deleted line   │    │                │
│    │                │ 11 │ added line     │

to the following. The fill char and style can be configured.

│ 10 │ deleted line   │    │ ╱╱╱╱╱╱╱╱╱╱╱╱╱╱ │
│    │ ╱╱╱╱╱╱╱╱╱╱╱╱╱╱ │ 11 │ added line     │

Thanks to @guanghechen for the idea (#2070).


  --side-by-side-fill-empty <CHAR_AND_STYLE>
      Fill empty side. Can be "true", or a fill character, or a character plus a style.

      On "true" the unmatched side will be filled with "/" in the style of
      --line-numbers-zero-style, if a single character is given this is used instead. If the
      character is followed by a style, that style is used.

Previews for dark and light mode:

Image Image

I like it so much, I'm tempted to make it the default!

This feature inspects on opt.computed.color_mode, which is
set by this function. Otherwise --light or --dark have no effect.
This changes

│ 10 │ deleted line   │    │                │
│    │                │ 11 │ added line     │

to the following. The fill char and style can be configured.

│ 10 │ deleted line   │    │ ╱╱╱╱╱╱╱╱╱╱╱╱╱╱ │
│    │ ╱╱╱╱╱╱╱╱╱╱╱╱╱╱ │ 11 │ added line     │

Thanks to @guanghechen for the idea.
@guanghechen
Copy link

LGTM! @th1000s, thank you so much for your amazing work on this—it's truly appreciated! Any plans to merge this PR? I can't wait to start using it!

@dandavison
Copy link
Owner

Very nice. Is there an argument for just side-by-side-fill rather than side-by-side-fill-empty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants