From e2a120869ba36da5d26df74fb23ef4052d55b6f0 Mon Sep 17 00:00:00 2001 From: Bailey Ling Date: Fri, 20 Feb 2015 19:35:18 -0500 Subject: [PATCH] fix load error for buffer_idx_mode. resolves #711 --- .../airline/extensions/tabline/buffers.vim | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) 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