Skip to content

Conversation

@esmuellert
Copy link
Owner

Summary

Add diff.original_position config option to control where the original (old) content appears in the diff view.

Changes

  • Add original_position option in config.lua with values "left" (default) or "right"
  • Modify view/init.lua to use leftabove vsplit when original_position = "right"
  • Update README documentation

Usage

require("codediff").setup({
  diff = {
    original_position = "right",  -- Modified on left, original on right
  },
})

Testing

All existing tests pass.

Add diff.original_position config option ('left' or 'right') to control
where the original (old) content appears in the diff view.

- Default: 'left' (original on left, modified on right)
- Set to 'right' to swap (modified on left, original on right)

Implementation uses 'leftabove vsplit' vs 'vsplit' to control split direction.
@esmuellert esmuellert enabled auto-merge January 10, 2026 21:27
@esmuellert esmuellert merged commit 5c52cdd into main Jan 10, 2026
13 checks passed
@esmuellert esmuellert deleted the feature/original-position-option branch January 10, 2026 21:36
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.

2 participants