Skip to content

feat(view)!: replace single_pane_for_one_sided with one_sided_layout#199

Merged
dlyongemallo merged 1 commit into
mainfrom
one_sided_layout
May 22, 2026
Merged

feat(view)!: replace single_pane_for_one_sided with one_sided_layout#199
dlyongemallo merged 1 commit into
mainfrom
one_sided_layout

Conversation

@dlyongemallo
Copy link
Copy Markdown
Owner

Boolean becomes value-typed ("default" | "raw", default "default"). "raw" now also substitutes Diff1Raw for diff1_plain bases, not just Diff2. diff1_inline is still skipped.

No migration; the old key is dropped outright.

Closes #184.

Boolean becomes value-typed (`"default"` | `"raw"`, default `"default"`).
`"raw"` now also substitutes `Diff1Raw` for `diff1_plain` bases, not
just `Diff2`. `diff1_inline` is still skipped.

No migration; the old key is dropped outright.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the boolean config view.single_pane_for_one_sided with a value-typed view.one_sided_layout ("default" | "raw") to control how one-sided diffs (A/?/D) are rendered, extending the “raw/plain buffer” behavior to Diff1 bases (while still skipping diff1_inline).

Changes:

  • Introduces view.one_sided_layout config option with schema/type/docs updates and runtime validation.
  • Updates FileEntry.with_layout layout selection to substitute Diff1Raw for one-sided entries when one_sided_layout = "raw" (including Diff1 bases; excluding diff1_inline).
  • Refreshes functional tests and help docs to match the new option and behavior.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lua/diffview/tests/functional/one_sided_layout_spec.lua Updates/extends functional coverage for the new view.one_sided_layout behavior and Diff1/Diff2 substitution rules.
lua/diffview/scene/layouts/diff_1_raw.lua Updates layout documentation to reference the new config key/value.
lua/diffview/scene/file_entry.lua Adjusts effective layout selection logic to use one_sided_layout and to exclude diff1_inline.
lua/diffview/config.lua Replaces config schema/type/docs for the new option and adds setup-time validation.
doc/diffview.txt Replaces the help section for the old boolean key with the new enum option and updated semantics.
doc/diffview_defaults.txt Updates documented defaults to reflect one_sided_layout.
Comments suppressed due to low confidence (1)

lua/diffview/tests/functional/one_sided_layout_spec.lua:64

  • The new view.one_sided_layout validation path (invalid value -> error + fallback to default) isn’t covered by this spec. Adding a small test case here (e.g. set one_sided_layout = "bogus" and assert it resets to "default") would help prevent regressions in the config schema behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/diffview/config.lua
@dlyongemallo dlyongemallo merged commit d17f7e6 into main May 22, 2026
11 checks passed
@dlyongemallo dlyongemallo deleted the one_sided_layout branch May 22, 2026 05:37
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.

When showing new files use normal (non diff buffer)

2 participants