diff --git a/autoload/airline/extensions/tabline/buffers.vim b/autoload/airline/extensions/tabline/buffers.vim index 31ebdb6..728b7ad 100644 --- a/autoload/airline/extensions/tabline/buffers.vim +++ b/autoload/airline/extensions/tabline/buffers.vim @@ -38,10 +38,6 @@ function! airline#extensions#tabline#buffers#on() autocmd! autocmd BufDelete * call airline#extensions#tabline#buffers#invalidate() augroup END - - if s:buffer_idx_mode - call s:define_buffer_idx_mode_mappings() - endif endfunction function! airline#extensions#tabline#buffers#invalidate() @@ -176,14 +172,14 @@ function! s:select_tab(buf_index) endif endfunction -function! s:define_buffer_idx_mode_mappings() - noremap! AirlineSelectTab1 :call select_tab(0) - noremap! AirlineSelectTab2 :call select_tab(1) - noremap! AirlineSelectTab3 :call select_tab(2) - noremap! AirlineSelectTab4 :call select_tab(3) - noremap! AirlineSelectTab5 :call select_tab(4) - noremap! AirlineSelectTab6 :call select_tab(5) - noremap! AirlineSelectTab7 :call select_tab(6) - noremap! AirlineSelectTab8 :call select_tab(7) - noremap! AirlineSelectTab9 :call select_tab(8) -endfunction +if s:buffer_idx_mode + noremap AirlineSelectTab1 :call select_tab(0) + noremap AirlineSelectTab2 :call select_tab(1) + noremap AirlineSelectTab3 :call select_tab(2) + noremap AirlineSelectTab4 :call select_tab(3) + noremap AirlineSelectTab5 :call select_tab(4) + noremap AirlineSelectTab6 :call select_tab(5) + noremap AirlineSelectTab7 :call select_tab(6) + noremap AirlineSelectTab8 :call select_tab(7) + noremap AirlineSelectTab9 :call select_tab(8) +endif