2021-02-13 01:03:57 +01:00
|
|
|
-- Copyright (c) 2020-2021 hoob3rt
|
|
|
|
-- MIT license, see LICENSE for more details.
|
2021-10-10 22:43:00 +06:00
|
|
|
local function progress()
|
2022-07-29 16:54:31 +06: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 07:16:42 +03:00
|
|
|
return string.format('%2d%%%%', math.floor(cur / total * 100))
|
2022-07-29 16:54:31 +06:00
|
|
|
end
|
2021-09-04 00:28:20 +06:00
|
|
|
end
|
2021-04-11 14:20:41 +06:00
|
|
|
|
2021-10-10 22:43:00 +06:00
|
|
|
return progress
|