Skip to content

Commit

Permalink
fix(blame): If it has been detached, the cache[bufnr] is nil
Browse files Browse the repository at this point in the history
  • Loading branch information
JavaHello authored and lewis6991 committed Sep 2, 2023
1 parent 44adf80 commit d927caa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/gitsigns/current_line_blame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ end
--- @param opts Gitsigns.CurrentLineBlameOpts
local function handle_blame_info(bufnr, lnum, blame_info, opts)
local bcache = cache[bufnr]
if not bcache then
return
end
local virt_text ---@type {[1]: string, [2]: string}[]
local clb_formatter = blame_info.author == 'Not Committed Yet'
and config.current_line_blame_formatter_nc
Expand Down

0 comments on commit d927caa

Please sign in to comment.