1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:20:04 +08:00

Show buffer name (#3340)

This commit is contained in:
Wang Shidong 2020-04-28 09:02:12 +08:00 committed by GitHub
parent bcfc169007
commit 083420d282
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -98,6 +98,7 @@ function! SpaceVim#layers#core#tabline#get() abort
let buflist = tabpagebuflist(i)
let winnr = tabpagewinnr(i)
let bufname = bufname(buflist[winnr - 1])
" let bufname = bufname(tabpagebuflist(i)[tabpagewinnr(i) - 1])
if s:SYS.isWindows
let bufname = substitute(bufname, '\\[', '[', 'g')
let bufname = substitute(bufname, '\\]', ']', 'g')

View File

@ -79,7 +79,7 @@ function! s:update_context() abort
call add(ctx,
\ '▼ ' . (page == tabpagenr() ? '*' : ' ')
\ . 'Tab ' . page
\ . ' ' . gettabvar(page, '_spacevim_tab_name', '')
\ . ' ' . gettabvar(page, '_spacevim_tab_name', bufname(tabpagebuflist(page)[tabpagewinnr(page) - 1]))
\ )
let winid = 1
for _buf in tree[page]
@ -94,7 +94,7 @@ function! s:update_context() abort
call add(ctx,
\ '▷ ' . (page == tabpagenr() ? '*' : ' ')
\ . 'Tab ' . page
\ . ' ' . gettabvar(page, '_spacevim_tab_name', '')
\ . ' ' . gettabvar(page, '_spacevim_tab_name', bufname(tabpagebuflist(page)[tabpagewinnr(page) - 1]))
\ )
endif
endfor