From 36a25ded76e47708e1a992fa5f2f7d9a5edf1fd7 Mon Sep 17 00:00:00 2001 From: zbirenbaum Date: Thu, 28 Apr 2022 04:06:38 -0400 Subject: [PATCH] fix x not closing nvim-tree --- lua/core/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/core/utils.lua b/lua/core/utils.lua index 7ebb577..75f3390 100644 --- a/lua/core/utils.lua +++ b/lua/core/utils.lua @@ -3,7 +3,7 @@ local M = {} local cmd = vim.cmd 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!" else cmd "bd"