fix: close windows properly (#924)

This commit is contained in:
Lopi-py
2022-02-17 02:19:42 -05:00
committed by GitHub
parent 06cabd5559
commit 5f047bc5f9
2 changed files with 17 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
local has_notify, notify = pcall(require, 'notify')
local a = vim.api
local uv = vim.loop
@@ -11,7 +13,11 @@ end
function M.warn(msg)
vim.schedule(function()
vim.notify("[NvimTree] "..msg, vim.log.levels.WARN)
if has_notify then
notify(msg, vim.log.levels.WARN, { title = "NvimTree" })
else
vim.notify("[NvimTree] "..msg, vim.log.levels.WARN)
end
end)
end