chore: autogen (vimdocs+formating)
This commit is contained in:
parent
1a6ab5f2f4
commit
abb03129e0
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue