From 8ff22c39355c93bab3ce36411017b82471ac88a7 Mon Sep 17 00:00:00 2001 From: Shadman Date: Mon, 11 Jan 2021 08:44:53 +0600 Subject: [PATCH] Fixed signify component apearing on non repo buffer (#58) * Fixed signify component apearing on non repo buffer --- lua/lualine/components/signify.lua | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lua/lualine/components/signify.lua b/lua/lualine/components/signify.lua index 9547f22..348af52 100644 --- a/lua/lualine/components/signify.lua +++ b/lua/lualine/components/signify.lua @@ -1,13 +1,11 @@ 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 + if added == -1 then return '' end local data = { - '+', added, - '~', modified, - '-', removed + '+'..added, + '-'..removed, + '~'..modified, } return table.concat(data, ' ') end