Skip to content

fix(view): avoid orphaned windows when using winfixbuf option - #340

Merged
dlyongemallo merged 1 commit into
mainfrom
fix_winfixbuf_orphaned_windows
Oct 8, 2026
Merged

dlyongemallo merged 1 commit into
mainfrom
fix_winfixbuf_orphaned_windows

Conversation

@dlyongemallo

@dlyongemallo dlyongemallo commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Fixes #336.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused fix addresses the reported failure and includes representative integration coverage.

0 open findings

What changed in this PR

Fixes #336 by avoiding :windo when creating layout pivots under winfixbuf.

Changes:

  • Creates the pivot directly in the first normal window.
  • Adds regression coverage for orphaned windows during layout cycling.
File Description
lua/​diffview/​scene/​views/​standard/​standard_view.lua Safely creates and tracks the layout pivot.
lua/​diffview/​tests/​functional/​winfixbuf_layout_cycle_spec.lua Verifies cycling leaves no orphaned windows.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@dlyongemallo
dlyongemallo merged commit 814ddc9 into main Oct 8, 2026
9 checks passed
@dlyongemallo
dlyongemallo deleted the fix_winfixbuf_orphaned_windows branch October 8, 2026 15:25
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.

[Bug] winfixbuf option causes orphaned windows when switching layouts

2 participants