2021-02-13 00:03:57 +00:00
|
|
|
-- Copyright (c) 2020-2021 hoob3rt
|
|
|
|
-- MIT license, see LICENSE for more details.
|
2021-10-10 16:43:00 +00:00
|
|
|
local function progress()
|
2022-07-29 10:54:31 +00:00
|
|
|
local cur = vim.fn.line('.')
|
|
|
|
local total = vim.fn.line('$')
|
|
|
|
if cur == 1 then
|
|
|
|
return 'Top'
|
|
|
|
elseif cur == total then
|
|
|
|
return 'Bot'
|
|
|
|
else
|
2023-03-30 04:16:42 +00:00
|
|
|
return string.format('%2d%%%%', math.floor(cur / total * 100))
|
2022-07-29 10:54:31 +00:00
|
|
|
end
|
2021-09-03 18:28:20 +00:00
|
|
|
end
|
2021-04-11 08:20:41 +00:00
|
|
|
|
2021-10-10 16:43:00 +00:00
|
|
|
return progress
|