Shadman 8ff22c3935
Fixed signify component apearing on non repo buffer (#58)
* Fixed signify component apearing on non repo buffer
2021-01-11 03:44:53 +01:00

14 lines
331 B
Lua

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 return '' end
local data = {
'+'..added,
'-'..removed,
'~'..modified,
}
return table.concat(data, ' ')
end
return signify