Open Rizhiy opened 3 weeks ago
I have the same problem, when I open more than 1 tab, it closed any last tab I have attached screen record of the problem
https://github.com/kndndrj/nvim-dbee/assets/24536844/7f10bc37-f277-4183-85e7-d4e1de655d7b
I have tab 1,2,3 then when I open nvim-dbee and close it, tab 3 disappeared and move all tab 3 buffer to tab 2.
also posting Discord discussion link with AstroNvim creator that think there is bad tab management things and it's close function https://discord.com/channels/939594913560031363/1257715805743747216/1257715805743747216
Here is a reproducing minimal configuration:
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
{
"kndndrj/nvim-dbee",
dependencies = {
"MunifTanjim/nui.nvim",
},
build = function()
-- Install tries to automatically detect the install method.
-- if it fails, try calling it with one of these parameters:
-- "curl", "wget", "bitsadmin", "go"
require("dbee").install()
end,
config = function()
require("dbee").setup(--[[optional config]])
end,
},
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
Steps to Reproduce
repro.lua
rm -rf .repro
, make sure to clean any previous repro environment (fine if this errors, it means no previous environment)nvim -u repro.lua
, start up neovim with the repro.lua
file and let it installq
, close out of Lazy plugin manager:e repro.lua
, open a file:tabnew
, make a new tab (see the new tab in the tabline on the topi
, go into insert modeHello, World!
, insert some text<Esc>
, leave insert mode:lua require("dbee").open()
, open the dbee interface:lua require("dbee").close()
, close dbeeHello, World!
Steps to reproduce:
:tabnew
):q
)Expected outcome: All relevant buffers are closed correctly, and you are either left with whatever was open before you opened db or the other tab.
Actual outcome: tab with dbee is closed, the first tab is change to a single empty buffer (even if there were multiple splits open before).