fix: collapse exit early if nvim-tree not loaded (#1128)

This commit is contained in:
Alexander Courtis
2022-04-02 21:40:59 +11:00
committed by GitHub
parent 51d1af4ee2
commit 62906f095b

View File

@@ -5,6 +5,10 @@ local core = require "nvim-tree.core"
local M = {}
function M.fn(keep_buffers)
if not core.get_explorer() then
return
end
local buffer_paths = {}
for _, buffer in ipairs(vim.api.nvim_list_bufs()) do
table.insert(buffer_paths, vim.api.nvim_buf_get_name(buffer))