-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(command): add BufferLineCloseOthers command #774
Conversation
lua/bufferline/commands.lua
Outdated
local index = M.get_current_element_index(state) | ||
if not index then return end | ||
|
||
for i, item in ipairs(vim.list_slice(state.components)) do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pirey why does this do a slice first? rather than just iterate the components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad, i was just trying things out.
i have updated it @akinsho
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pirey the last thing this needs is to be added to the help documentation in bufferline.txt
so other users know this exists
@akinsho |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now thanks 👍🏾
Co-authored-by: Akin <[email protected]>
This PR addresses the issue #317
In the issue, it was suggested to use
:only
, but:only
will only close other windows, not buffers.This new command can be used to close all buffers except the current one.