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('- %(')
|
local _, cstart = line:find('- %(')
|
||||||
if cstart then
|
if cstart then
|
||||||
local cend = string.find(line, '%) ')
|
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
|
end
|
||||||
local dstart, _ = line:find(' %(%d')
|
local dstart, _ = line:find(' %(%d')
|
||||||
if dstart then
|
if dstart then
|
||||||
|
|||||||
Reference in New Issue
Block a user