fix: remove buffer when its empty when hijacking
This commit is contained in:
parent
8eed3ff805
commit
0babcb4f2c
@ -302,6 +302,11 @@ function M.open_on_directory()
|
||||
local buf = api.nvim_get_current_buf()
|
||||
local bufname = api.nvim_buf_get_name(buf)
|
||||
if vim.fn.isdirectory(bufname) ~= 1 then
|
||||
if bufname == "" then
|
||||
vim.schedule(function()
|
||||
vim.api.nvim_buf_delete(buf, { force = true })
|
||||
end)
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user