Skip to content

Mark changed lines with a coloured bar, as herdr-reviewr does - #6

Closed
rednafi wants to merge 1 commit into
fix-editorfrom
diff-bars
Closed

rednafi wants to merge 1 commit into
fix-editorfrom
diff-bars

Conversation

@rednafi

@rednafi rednafi commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Fixes #3. Stacked on #5.

Change

  • A bar ▌ in the colour of the line (ANSI green or red) marks an inserted or a deleted line, in place of + or -. This is the style of herdr-reviewr.
  • The bar takes the same two cells as a sign. The columns, the clicks, the wrap, and the scroll do not change.
  • The setting diff_signs = true gives + and - back, for users who want marks that do not depend on colour.
  • The review text that goes to the agent keeps + and -.
  • The vendored diffview has the change. crush has no option for it, so VENDORED.md lists it.
   3  3   func A() int {          diff_signs = true:     3  3   func A() int {
   4    ▌     return 1                                   4    -     return 1
      4 ▌     x := 2                                        4 +     x := 2
      5 ▌     return x                                      5 +     return x

Tests

  • diff.TestMarks: the exact screen lines with the bar and with signs, in the unified and the split layout; the colour of each mark (red for a delete, green for an insert); the bar with a scroll to the right (▌…cdefgh); the review text keeps + and - in both cases.
  • tui.TestDiffSigns: the screen of rexdiff shows the bar by default, and +/- with {"diff_signs": true}.
  • TestParseConfig accepts diff_signs.
  • Checked in Rex with the built binary: unified, split, and diff_signs.

A bar in the colour of the line, green or red, marks an inserted or a
deleted line in place of + or -. The bar takes the same two cells, so
the columns, the clicks, and the wrap do not change. The setting
diff_signs = true gives the signs back. The review text for the agent
keeps + and -.

Fixes #3
@rednafi

rednafi commented Oct 26, 2026

Copy link
Copy Markdown
Owner Author

Merged into master through #10.

@rednafi rednafi mentioned this pull request Oct 26, 2026
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.

1 participant