fix(config): always include configured layout in layouts cycle#119
fix(config): always include configured layout in layouts cycle#119dlyongemallo merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR ensures Diffview’s cycle_layout action always has a valid way to return to the view’s configured starting layout by automatically including that layout in the configured cycle list, and by fixing cycling behavior when the current layout isn’t found in the cycle.
Changes:
- Auto-append each view’s configured
layoutto the correspondingview.cycle_layoutslist duringconfig.setup()(skipping the-1sentinel). - Fix
actions.cycle_layout()to cycle to the first entry (not the last) when the current layout is not present in the cycle list. - Update functional tests and documentation to reflect the new cycle resolution behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lua/diffview/config.lua | Appends configured starting layouts into cycle lists during setup to guarantee return-to-start cycling. |
| lua/diffview/actions.lua | Adjusts cycle index computation to handle “not found” layouts correctly. |
| lua/diffview/tests/functional/cycle_layouts_spec.lua | Adds/updates tests for auto-insertion and the “not found goes to first” behavior. |
| doc/diffview_defaults.txt | Documents that configured layouts are auto-appended to cycles by setup. |
| doc/diffview.txt | Expands config docs for view.cycle_layouts to describe the auto-append behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d5e0e34 to
f033dcf
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f033dcf to
9093812
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9093812 to
2658dac
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.