fix: check bcache in get_hunks

Fixes #979
Closes #981
This commit is contained in:
Lewis Russell 2024-04-07 09:24:19 +01:00
parent 81369ed540
commit 1a50b94066
1 changed files with 3 additions and 0 deletions

View File

@ -228,6 +228,9 @@ end
--- @return Gitsigns.Hunk.Hunk?
local function get_hunk(bufnr, range, greedy, staged)
local bcache = cache[bufnr]
if not bcache then
return
end
local hunks = get_hunks(bufnr, bcache, greedy, staged)
if not range then