Co-authored-by: Shadman <13149513+shadmansaleh@users.noreply.github.com>
This commit is contained in:
parent
1dc8b44423
commit
2248ef254d
@ -19,8 +19,8 @@ function M:update_status()
|
|||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
local result = vim.fn.searchcount { maxcount = self.options.maxcount, timeout = self.options.timeout }
|
local ok, result = pcall(vim.fn.searchcount, { maxcount = self.options.maxcount, timeout = self.options.timeout })
|
||||||
if next(result) == nil then
|
if not ok or next(result) == nil then
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user