From c6c5991a03d7f81a0bf24845a9e53690beaac831 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Thu, 11 Apr 2024 11:23:33 -0400 Subject: [PATCH] fix(blame-nvim): make sure buffer is valid before checking filetype --- lua/astrocommunity/git/blame-nvim/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/astrocommunity/git/blame-nvim/init.lua b/lua/astrocommunity/git/blame-nvim/init.lua index 65e75b161..9f759c575 100644 --- a/lua/astrocommunity/git/blame-nvim/init.lua +++ b/lua/astrocommunity/git/blame-nvim/init.lua @@ -24,7 +24,7 @@ return { return require("astrocore").extend_tbl(opts, { opts = { disable_winbar_cb = function(args) - if vim.bo[args.buf].filetype == "blame" then return false end + if vim.api.nvim_buf_is_valid(args.buf) and vim.bo[args.buf].filetype == "blame" then return false end if disable_winbar_cb then return disable_winbar_cb(args) end end, },