fix: git branches previewer add nil check to cend (#478)
Co-authored-by: Corentin Brunel <cbrunel@localhost.localdomain>
This commit is contained in:
@@ -403,7 +403,9 @@ previewers.git_branch_log = defaulter(function(_)
|
||||
local _, cstart = line:find('- %(')
|
||||
if cstart then
|
||||
local cend = string.find(line, '%) ')
|
||||
vim.api.nvim_buf_add_highlight(bufnr, ns_previewer, "TelescopeResultsConstant", i - 1, cstart - 1, cend)
|
||||
if cend then
|
||||
vim.api.nvim_buf_add_highlight(bufnr, ns_previewer, "TelescopeResultsConstant", i - 1, cstart - 1, cend)
|
||||
end
|
||||
end
|
||||
local dstart, _ = line:find(' %(%d')
|
||||
if dstart then
|
||||
|
||||
Reference in New Issue
Block a user