fix <leader>x not closing nvim-tree

This commit is contained in:
zbirenbaum 2022-04-28 04:06:38 -04:00
parent aa4bab9605
commit 36a25ded76

View file

@ -3,7 +3,7 @@ local M = {}
local cmd = vim.cmd local cmd = vim.cmd
M.close_buffer = function(force) M.close_buffer = function(force)
if force or not vim.bo.buflisted then if force or not vim.bo.buflisted or vim.bo.buftype == 'nofile' then
cmd ":bd!" cmd ":bd!"
else else
cmd "bd" cmd "bd"