From 58d0461219ddd35baacf0ba9ec02ed33e8c1d18c Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Mon, 22 May 2023 18:11:27 -0500 Subject: Change to buf isValid --- lua/buffer_browser.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/buffer_browser.lua b/lua/buffer_browser.lua index c9ab6d7..7eeabbc 100644 --- a/lua/buffer_browser.lua +++ b/lua/buffer_browser.lua @@ -136,7 +136,7 @@ local function getBufNr() end local function getFiletype(bufnr) - if (bufnr == nil and vim.bo[bufnr] == nil) then + if (bufnr == nil and api.nvim_buf_is_valid(bufnr)) then return nil end return vim.bo[bufnr].filetype -- cgit v1.2.3