~toastal/lualine.nvim

2248ef254d0a1488a72041cfb45ca9caada6d994 — Alexander Courtis 8 months ago 1dc8b44 main
fix(#1087): handle searchcount failures (#1088)

Co-authored-by: Shadman <13149513+shadmansaleh@users.noreply.github.com>
1 files changed, 2 insertions(+), 2 deletions(-)

M lua/lualine/components/searchcount.lua
M lua/lualine/components/searchcount.lua => lua/lualine/components/searchcount.lua +2 -2
@@ 19,8 19,8 @@ function M:update_status()
    return ''
  end

  local result = vim.fn.searchcount { maxcount = self.options.maxcount, timeout = self.options.timeout }
  if next(result) == nil then
  local ok, result = pcall(vim.fn.searchcount, { maxcount = self.options.maxcount, timeout = self.options.timeout })
  if not ok or next(result) == nil then
    return ''
  end