mirror of
https://github.com/vim-airline/vim-airline.git
synced 2024-11-23 07:10:59 +08:00
Fix buffer order in tabline with CtrlSpace plugin
This commit is contained in:
parent
9614105d09
commit
f117de553b
|
@ -30,7 +30,15 @@ endfunction
|
||||||
|
|
||||||
function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pull_right)
|
function! airline#extensions#tabline#ctrlspace#add_buffer_section(builder, cur_tab, cur_buf, pull_right)
|
||||||
let pos_extension = (a:pull_right ? '_right' : '')
|
let pos_extension = (a:pull_right ? '_right' : '')
|
||||||
let buffer_list = ctrlspace#api#BufferList(a:cur_tab)
|
|
||||||
|
let buffer_list = []
|
||||||
|
for bufferindex in sort(keys(ctrlspace#api#Buffers(a:cur_tab)), 'N')
|
||||||
|
for buffer in ctrlspace#api#BufferList(a:cur_tab)
|
||||||
|
if buffer['index'] == bufferindex
|
||||||
|
call add(buffer_list, buffer)
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfor
|
||||||
|
|
||||||
" add by tenfy(tenfyzhong@qq.com)
|
" add by tenfy(tenfyzhong@qq.com)
|
||||||
" if the current buffer no in the buffer list
|
" if the current buffer no in the buffer list
|
||||||
|
|
Loading…
Reference in New Issue
Block a user