fix(blame): render blame end_col out of range

This commit is contained in:
belltoy 2024-07-07 19:30:45 +08:00 committed by Lewis Russell
parent 39b5b6f48b
commit aa12bb9cd2

View file

@ -113,8 +113,9 @@ local function render(blame, win, main_win, buf_sha)
})
if commit_lines[i] then
api.nvim_buf_set_extmark(bufnr, ns, i - 1, win_width - 10, {
end_col = win_width,
local width = string.len(lines[i])
api.nvim_buf_set_extmark(bufnr, ns, i - 1, width - 10, {
end_col = width,
hl_group = 'Title',
})
else