mirror of
https://github.com/vim-airline/vim-airline-themes.git
synced 2024-12-05 08:30:03 +08:00
fix buffer mismatch in certain cases. resolves #715.
This commit is contained in:
parent
b08784907a
commit
c78767a564
|
@ -23,5 +23,10 @@ function! airline#extensions#tabline#formatters#unique_tail#format(bufnr, buffer
|
|||
let map[nr] = airline#extensions#tabline#formatters#default#wrap_name(nr, fnamemodify(bufname(nr), ':p:.'))
|
||||
endfor
|
||||
|
||||
return map[a:bufnr]
|
||||
if has_key(map, a:bufnr)
|
||||
return map[a:bufnr]
|
||||
endif
|
||||
|
||||
" if we get here, the buffer list isn't in sync with the selected buffer yet, fall back to the default
|
||||
return airline#extensions#tabline#formatters#default#format(a:bufnr, a:buffers)
|
||||
endfunction
|
||||
|
|
Loading…
Reference in New Issue
Block a user