nvim: statusline: Fix git status being nil

signs.add/change/delete can be nil for a file not yet being tracked
with git. This was broken in 703d23c.
This commit is contained in:
Sanchayan Maity 2024-04-08 19:54:22 +05:30
parent 1ef7928b75
commit f3736630c0
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -143,11 +143,11 @@ M.get_git_status = function(self)
and string.format(
" %s+%s %s~%s %s-%s",
"%#DiffAdded#",
signs.add,
signs.add or 0,
"%#DiffChanged#",
signs.change,
signs.change or 0,
"%#DiffRemoved#",
signs.delete
signs.delete or 0
)
or ""
end