fix: open buffers in last active window

This commit is contained in:
əlemi 2024-09-06 19:11:34 +02:00
parent ca3f6f210a
commit 9341095b68
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -44,8 +44,9 @@ M.open = function(state, path, extra)
end end
if selected.type == "buffer" then if selected.type == "buffer" then
local window = utils.get_appropriate_window(state) local window = utils.get_appropriate_window(state)
local buf = vim.api.nvim_win_get_buf(window)
vim.api.nvim_set_current_win(window) vim.api.nvim_set_current_win(window)
buf_manager.attach(selected.name) buf_manager.attach(selected.name, buf)
return return
end end
if selected.type == "user" then if selected.type == "user" then