mirror of
https://github.com/lewis6991/gitsigns.nvim
synced 2025-02-23 00:07:04 +00:00
fix: just another nil error
This commit is contained in:
parent
ef153188e8
commit
0beb194164
2
lua/gitsigns/actions.lua
generated
2
lua/gitsigns/actions.lua
generated
@ -651,7 +651,7 @@ M.get_hunks = function(bufnr)
|
||||
bufnr = current_buf()
|
||||
if not cache[bufnr] then return end
|
||||
local ret = {}
|
||||
for _, h in ipairs(cache[bufnr].hunks) do
|
||||
for _, h in ipairs(cache[bufnr].hunks or {}) do
|
||||
ret[#ret + 1] = {
|
||||
head = h.head,
|
||||
lines = gs_hunks.patch_lines(h, vim.bo[bufnr].fileformat),
|
||||
|
@ -651,7 +651,7 @@ M.get_hunks = function(bufnr: integer): {Hunk_Public}
|
||||
bufnr = current_buf()
|
||||
if not cache[bufnr] then return end
|
||||
local ret = {}
|
||||
for _, h in ipairs(cache[bufnr].hunks) do
|
||||
for _, h in ipairs(cache[bufnr].hunks or {}) do
|
||||
ret[#ret+1] = {
|
||||
head = h.head,
|
||||
lines = gs_hunks.patch_lines(h, vim.bo[bufnr].fileformat),
|
||||
|
Loading…
Reference in New Issue
Block a user