Skip to content

Commit

Permalink
Merge pull request #522 from Danthewaann/master
Browse files Browse the repository at this point in the history
fix(file-entry): ignore possible extmark out of bounds error
  • Loading branch information
pwntester committed Mar 21, 2024
2 parents 72bd42c + fcc2c5c commit bff516b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/octo/reviews/file-entry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,13 @@ function FileEntry:place_signs()
local opts = {
virt_text = { { vt_msg, "Comment" } },
virt_text_pos = "right_align",
-- adding the extmark below can fail if we are in the `COMMIT` review level and the commit contains thread comments
-- that is why we set strict to `false` here to ignore this possible error
strict = false
}
vim.api.nvim_buf_set_extmark(split.bufnr, constants.OCTO_REVIEW_COMMENTS_NS, startLine - 1, -1, opts)
-- break out to prevent duplicate extmarks for the current comment thread
break
end
end
end
Expand Down

0 comments on commit bff516b

Please sign in to comment.