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)
|
- `location` (location in file in line:column format)
|
||||||
- `mode` (vim mode)
|
- `mode` (vim mode)
|
||||||
- `progress` (%progress in file)
|
- `progress` (%progress in file)
|
||||||
|
- `searchcount` (number of search matches when hlsearch is active)
|
||||||
- `tabs` (shows currently available tabs)
|
- `tabs` (shows currently available tabs)
|
||||||
- `windows` (shows currently available windows)
|
- `windows` (shows currently available windows)
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
local function searchcount()
|
local function searchcount()
|
||||||
if vim.v.hlsearch == 0 then
|
if vim.v.hlsearch == 0 then
|
||||||
return ""
|
return ''
|
||||||
end
|
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)
|
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
|
end
|
||||||
|
|
||||||
return searchcount
|
return searchcount
|
||||||
|
|
Loading…
Reference in New Issue