mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-06-05 11:59:42 +00:00
fix: wrap nvim_buf_set_option in a protected call (#2346)
(cherry picked from commit 65287605c3)
This commit is contained in:
@@ -126,8 +126,7 @@ end
|
||||
--- Attach regex highlighter
|
||||
utils.regex_highlighter = function(bufnr, ft)
|
||||
if has_filetype(ft) then
|
||||
vim.api.nvim_buf_set_option(bufnr, "syntax", ft)
|
||||
return true
|
||||
return pcall(vim.api.nvim_buf_set_option, bufnr, "syntax", ft)
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user