fixup: tabs component doesn't show fugitive status name properly
fixes #900
This commit is contained in:
parent
3325d5d43a
commit
b6314ac556
|
@ -31,7 +31,9 @@ function Tab:label()
|
||||||
local bufnr = buflist[winnr]
|
local bufnr = buflist[winnr]
|
||||||
local file = modules.utils.stl_escape(vim.api.nvim_buf_get_name(bufnr))
|
local file = modules.utils.stl_escape(vim.api.nvim_buf_get_name(bufnr))
|
||||||
local buftype = vim.fn.getbufvar(bufnr, '&buftype')
|
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')
|
return 'help:' .. vim.fn.fnamemodify(file, ':t:r')
|
||||||
elseif buftype == 'terminal' then
|
elseif buftype == 'terminal' then
|
||||||
local match = string.match(vim.split(file, ' ')[1], 'term:.*:(%a+)')
|
local match = string.match(vim.split(file, ' ')[1], 'term:.*:(%a+)')
|
||||||
|
|
Loading…
Reference in New Issue