Skip to content

feat(explorer): support position = "right"#337

Draft
AJamesyD wants to merge 1 commit intoesmuellert:mainfrom
AJamesyD:fix/layout-right-panel
Draft

feat(explorer): support position = "right"#337
AJamesyD wants to merge 1 commit intoesmuellert:mainfrom
AJamesyD:fix/layout-right-panel

Conversation

@AJamesyD
Copy link

Would love to be able to put the explorer panel on the right side. I poked around and it looks like split.lua already supports "right" in its position map, so adding it was pretty straightforward.

The main change is in layout.lua: arrange() assumed the panel was either "left" (vertical) or "bottom" (horizontal), so "right" fell through to the wrong sizing path. This adds "right" to the width checks at the three sites in arrange(), and updates the config comments for both explorer and history panels.

Without the fix, "right" technically "works" (the panel appears on the right) but the layout breaks if you're running cmdheight=0.

(AI tooling helped with debugging. Fix verified manually.)

split.lua already maps "right" correctly and handles width vs height
for it. layout.lua was the one gap: arrange() only checked for "left"
before calling set_width, so "right" fell through to set_height.

Adds "right" to the width checks in arrange() (3 sites) and updates
the config comments to document the option.
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.

1 participant