Skip to content

feat(config): allow diff1_plain layout in standard diff views#8

Merged
dlyongemallo merged 1 commit intomainfrom
feat_diff1_standard
Feb 6, 2026
Merged

feat(config): allow diff1_plain layout in standard diff views#8
dlyongemallo merged 1 commit intomainfrom
feat_diff1_standard

Conversation

@dlyongemallo
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings February 6, 2026 16:07
@dlyongemallo dlyongemallo merged commit 773e15b into main Feb 6, 2026
4 checks passed
Copy link

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

Updates Diffview’s config validation to allow the diff1_plain layout in “standard” view layout settings.

Changes:

  • Add "diff1_plain" to the list of valid standard_layouts used for validating view.default.layout and view.file_history.layout.

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

Comment on lines 613 to 617
local view = M._config.view
local standard_layouts = { "diff2_horizontal", "diff2_vertical", -1 }
local standard_layouts = { "diff1_plain", "diff2_horizontal", "diff2_vertical", -1 }
local merge_layuots = {
"diff1_plain",
"diff3_horizontal",
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

By adding "diff1_plain" to standard_layouts, this also implicitly allows view.file_history.layout = "diff1_plain" (since valid_layouts.file_history = standard_layouts). The file-history view has code paths that assume a Diff2 layout (e.g. scene/views/file_history/listeners.lua:open_in_diffview accesses layout.a.file.rev), which will error for Diff1 layouts that only have b. Consider either (a) keeping file_history restricted to Diff2 layouts, or (b) updating file-history actions to handle Diff1 (or to disable/guard actions that require both a and b).

Copilot uses AI. Check for mistakes.
Comment on lines +614 to 615
local standard_layouts = { "diff1_plain", "diff2_horizontal", "diff2_vertical", -1 }
local merge_layuots = {
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Nit: merge_layuots looks like a typo ("layuots" vs "layouts"). Since this validation block is being touched, consider renaming it to merge_layouts to avoid propagating the misspelling.

Copilot uses AI. Check for mistakes.
@dlyongemallo dlyongemallo deleted the feat_diff1_standard branch February 9, 2026 07:08
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