aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 5e419c2..9533564 100644
--- a/lua/luatab/init.lua
+++ b/lua/luatab/init.lua
@@ -65,11 +65,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
@@ -80,7 +80,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 = {