Merge pull request #680 from psychomario/show-tabs

Added tabline#show_tabs to disable tab bar
This commit is contained in:
Bailey Ling 2015-01-01 10:18:48 -05:00
commit 1fd9886219
2 changed files with 5 additions and 1 deletions

View File

@ -5,6 +5,7 @@ let s:formatter = get(g:, 'airline#extensions#tabline#formatter', 'default')
let s:excludes = get(g:, 'airline#extensions#tabline#excludes', []) let s:excludes = get(g:, 'airline#extensions#tabline#excludes', [])
let s:tab_nr_type = get(g:, 'airline#extensions#tabline#tab_nr_type', 0) let s:tab_nr_type = get(g:, 'airline#extensions#tabline#tab_nr_type', 0)
let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) let s:show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1)
let s:show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1)
let s:show_tab_nr = get(g:, 'airline#extensions#tabline#show_tab_nr', 1) let s:show_tab_nr = get(g:, 'airline#extensions#tabline#show_tab_nr', 1)
let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1) let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1)
let s:show_close_button = get(g:, 'airline#extensions#tabline#show_close_button', 1) let s:show_close_button = get(g:, 'airline#extensions#tabline#show_close_button', 1)
@ -113,7 +114,7 @@ function! airline#extensions#tabline#get()
let s:current_tabcnt = curtabcnt let s:current_tabcnt = curtabcnt
let s:current_bufnr = -1 " force a refresh... let s:current_bufnr = -1 " force a refresh...
endif endif
if s:show_buffers && curtabcnt == 1 if s:show_buffers && curtabcnt == 1 || !s:show_tabs
return s:get_buffers() return s:get_buffers()
else else
return s:get_tabs() return s:get_tabs()

View File

@ -391,6 +391,9 @@ eclim <https://eclim.org>
* enable/disable displaying buffers with a single tab. > * enable/disable displaying buffers with a single tab. >
let g:airline#extensions#tabline#show_buffers = 1 let g:airline#extensions#tabline#show_buffers = 1
< <
* enable/disable displaying tabs, regardless of number. >
let g:airline#extensions#tabline#show_tabs = 1
<
* configure filename match rules to exclude from the tabline. > * configure filename match rules to exclude from the tabline. >
let g:airline#extensions#tabline#excludes = [] let g:airline#extensions#tabline#excludes = []
< <