Skip to content

Commit

Permalink
fix(setup): dropbar attaches to wrong window
Browse files Browse the repository at this point in the history
  • Loading branch information
bekaboo committed Aug 23, 2024
1 parent 6ca84ad commit 6156e07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/dropbar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ local function setup(opts)
vim.api.nvim_create_autocmd(configs.opts.general.attach_events, {
group = groupid,
callback = function(info)
utils.bar.attach(info.buf, 0, info)
-- Try attaching dropbar to all windows containing the buffer
-- Notice that we cannot simply let `win=0` here since the current
-- buffer isn't necessarily the window containing the buffer
for _, win in ipairs(vim.fn.win_findbuf(info.buf)) do
utils.bar.attach(info.buf, win, info)
end
end,
desc = 'Attach dropbar',
})
Expand Down

0 comments on commit 6156e07

Please sign in to comment.