mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 05:50:05 +08:00
perf(tabline): use lua tablineat function
This commit is contained in:
parent
ccfceebe98
commit
5b127e22dd
@ -72,7 +72,7 @@ local function build_item(bufnr, n)
|
|||||||
|
|
||||||
local icon = ''
|
local icon = ''
|
||||||
|
|
||||||
local tablineat = '%' .. n .. '@SpaceVim#layers#core#tabline#jump@'
|
local tablineat = '%' .. n .. '@v:lua.___spacevim_tabline.jump@'
|
||||||
|
|
||||||
if name == '' then
|
if name == '' then
|
||||||
name = 'No Name'
|
name = 'No Name'
|
||||||
@ -447,7 +447,8 @@ function M.get()
|
|||||||
local preview_item
|
local preview_item
|
||||||
if #left_hide_bufs > 0 and vim.fn.tabpagenr('$') == 1 then
|
if #left_hide_bufs > 0 and vim.fn.tabpagenr('$') == 1 then
|
||||||
tablinestr = '%#SpaceVim_tabline_b# << '
|
tablinestr = '%#SpaceVim_tabline_b# << '
|
||||||
.. #left_hide_bufs .. ' '
|
.. #left_hide_bufs
|
||||||
|
.. ' '
|
||||||
.. tabline_sep(preview_item, shown_items[1])
|
.. tabline_sep(preview_item, shown_items[1])
|
||||||
end
|
end
|
||||||
for _, item in ipairs(shown_items) do
|
for _, item in ipairs(shown_items) do
|
||||||
@ -573,4 +574,6 @@ function M.jump(id)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
_G.___spacevim_tabline = { jump = M.jump }
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
Loading…
Reference in New Issue
Block a user