From bfa0d99ba6f98d077dd91779841f1c88b7b5c165 Mon Sep 17 00:00:00 2001 From: shadmansaleh <13149513+shadmansaleh@users.noreply.github.com> Date: Mon, 28 Nov 2022 20:48:27 +0600 Subject: [PATCH] fixup: All tab names have prefix "fugitive: " if current buffer is fugitive status buffer fixes #901 --- lua/lualine/components/tabs/tab.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/lualine/components/tabs/tab.lua b/lua/lualine/components/tabs/tab.lua index 15edfb1..d610c1d 100644 --- a/lua/lualine/components/tabs/tab.lua +++ b/lua/lualine/components/tabs/tab.lua @@ -31,7 +31,7 @@ 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 vim.bo.filetype == 'fugitive' then + if vim.api.nvim_buf_get_option(bufnr, 'filetype') == 'fugitive' then return 'fugitive: ' .. vim.fn.fnamemodify(file, ':h:h:t') elseif buftype == 'help' then return 'help:' .. vim.fn.fnamemodify(file, ':t:r')