2021-01-03 23:37:49 +00:00
|
|
|
local function signify()
|
|
|
|
if vim.fn.exists('*sy#repo#get_stats') == 0 then return '' end
|
|
|
|
local added, modified, removed = unpack(vim.fn['sy#repo#get_stats']())
|
|
|
|
if added == -1 then added = 0 end
|
|
|
|
if modified == -1 then modified = 0 end
|
|
|
|
if removed == -1 then removed = 0 end
|
2021-01-04 01:14:29 +00:00
|
|
|
local data = {
|
|
|
|
'+', added,
|
|
|
|
'~', modified,
|
|
|
|
'-', removed
|
|
|
|
}
|
|
|
|
return table.concat(data, ' ')
|
2021-01-03 23:37:49 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
return signify
|