From b6314ac556098d7abea9bb8cf896d2e3500eca41 Mon Sep 17 00:00:00 2001
From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com>
Date: Sat, 26 Nov 2022 09:58:47 +0600
Subject: [PATCH] fixup: tabs component doesn't show fugitive status name
 properly

fixes #900
---
 lua/lualine/components/tabs/tab.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lua/lualine/components/tabs/tab.lua b/lua/lualine/components/tabs/tab.lua
index e9d75ab..15edfb1 100644
--- a/lua/lualine/components/tabs/tab.lua
+++ b/lua/lualine/components/tabs/tab.lua
@@ -31,7 +31,9 @@ function Tab:label()
   local bufnr = buflist[winnr]
   local file = modules.utils.stl_escape(vim.api.nvim_buf_get_name(bufnr))
   local buftype = vim.fn.getbufvar(bufnr, '&buftype')
-  if buftype == 'help' then
+  if vim.bo.filetype == 'fugitive' then
+    return 'fugitive: ' .. vim.fn.fnamemodify(file, ':h:h:t')
+  elseif buftype == 'help' then
     return 'help:' .. vim.fn.fnamemodify(file, ':t:r')
   elseif buftype == 'terminal' then
     local match = string.match(vim.split(file, ' ')[1], 'term:.*:(%a+)')