Skip to content

Commit

Permalink
fix: check bcache in get_hunks
Browse files Browse the repository at this point in the history
Fixes #979
Closes #981
  • Loading branch information
lewis6991 committed Apr 7, 2024
1 parent 81369ed commit 1a50b94
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/gitsigns/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a50b94

Please sign in to comment.