aboutsummaryrefslogtreecommitdiff
path: root/lua/luatab
diff options
context:
space:
mode:
Diffstat (limited to 'lua/luatab')
-rw-r--r--lua/luatab/init.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/lua/luatab/init.lua b/lua/luatab/init.lua
index 597af3a..92fa05e 100644
--- a/lua/luatab/init.lua
+++ b/lua/luatab/init.lua
@@ -64,11 +64,11 @@ local function formatTab(current)
local bufnr = buflist[winnr]
local hl = (isSelected and '%#TabLineSel#' or '%#TabLine#')
- return hl .. ' ' ..
+ return hl .. '%' .. current .. 'T' .. ' ' ..
tabWindowCount(current) ..
tabName(bufnr) .. ' ' ..
tabModified(bufnr) ..
- tabDevicon(bufnr, isSelected) ..
+ tabDevicon(bufnr, isSelected) .. '%T' ..
tabSeparator(current)
end
@@ -79,7 +79,11 @@ local function tabline()
line = line .. formatTab(i)
i = i + 1
end
- return line .. '%T%#TabLineFill#%='
+ line = line .. '%#TabLineFill#%='
+ if vim.fn.tabpagenr('$') > 1 then
+ line = line .. '%#TabLine#%999XX'
+ end
+ return line
end
local M = {