Skip to content

Add O command to open in the original window at BufExplorer launch.#128

Merged
jlanzarotta merged 2 commits intojlanzarotta:masterfrom
drmikehenry:original-window
Mar 24, 2025
Merged

Add O command to open in the original window at BufExplorer launch.#128
jlanzarotta merged 2 commits intojlanzarotta:masterfrom
drmikehenry:original-window

Conversation

@drmikehenry
Copy link
Copy Markdown
Contributor

Summary

Details

When launching BufExplorer via :BufExplorer, the original launch window is reused temporarily for BufExplorer; then, when pressing <Enter> to select a buffer, BufExplorer closes and the original launch window is used for the selected buffer.

But when launching BufExplorer via :BufExplorerHorizontalSplit or :BufExplorerVerticalSplit, a new split is created for BufExplorer. If <Enter> is used to select a buffer, this buffer will be opened in the split created for BufExplorer.

This new O command provides a way to first close the split that was created for BufExplorer at launch such that the selected buffer will be opened in the original window.

When launching BufExplorer via `:BufExplorer`, the original launch
window is reused temporarily for BufExplorer; then, when pressing
`<Enter>` to select a buffer, BufExplorer closes and the original launch
window is used for the selected buffer.

But when launching BufExplorer via `:BufExplorerHorizontalSplit` or
`:BufExplorerVerticalSplit`, a new split is created for BufExplorer.  If
`<Enter>` is used to select a buffer, this buffer will be opened in the
split created for BufExplorer.

This new `O` command provides a way to first close the split that was
created for BufExplorer at launch such that the selected buffer will
be opened in the original window.

This addresses issue jlanzarotta#55.
@jlanzarotta
Copy link
Copy Markdown
Owner

Let me pull all the changes and take a look.

@jlanzarotta jlanzarotta merged commit c116681 into jlanzarotta:master Mar 24, 2025
@drmikehenry drmikehenry deleted the original-window branch March 24, 2025 23:22
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