12 lines
300 B
Lua
12 lines
300 B
Lua
local function searchcount()
|
|
if vim.v.hlsearch == 0 then
|
|
return ""
|
|
end
|
|
|
|
local result = vim.fn.searchcount({ maxcount = 999, timeout = 500 })
|
|
local denominator = math.min(result.total, result.maxcount)
|
|
return string.format("[%d/%d]", result.current, denominator)
|
|
end
|
|
|
|
return searchcount
|