chore: autogen (vimdocs+formating)

This commit is contained in:
shadmansaleh 2022-10-19 09:07:21 +00:00 committed by github-actions[bot]
parent 1a6ab5f2f4
commit abb03129e0
2 changed files with 4 additions and 3 deletions

View File

@ -250,6 +250,7 @@ CHANGING COMPONENTS IN LUALINE SECTIONS ~
- `location` (location in file in line:column format)
- `mode` (vim mode)
- `progress` (%progress in file)
- `searchcount` (number of search matches when hlsearch is active)
- `tabs` (shows currently available tabs)
- `windows` (shows currently available windows)

View File

@ -1,11 +1,11 @@
local function searchcount()
if vim.v.hlsearch == 0 then
return ""
return ''
end
local result = vim.fn.searchcount({ maxcount = 999, timeout = 500 })
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)
return string.format('[%d/%d]', result.current, denominator)
end
return searchcount