Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(pinned): buffer does not exist after switching sessions #963

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lua/bufferline/groups.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ local group_state = {
local function persist_pinned_buffers()
local pinned = {}
for buf, group in pairs(group_state.manual_groupings) do
if group == PINNED_ID then table.insert(pinned, api.nvim_buf_get_name(buf)) end
if group == PINNED_ID and vim.fn.bufexists(buf) == 1 then
table.insert(pinned, api.nvim_buf_get_name(buf))
end
end

if #pinned == 0 then
Expand Down