Skip to content

Commit

Permalink
Adjust buffer numbers for buf_idx_mode v2 slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbra committed Feb 8, 2019
1 parent 647ab6d commit d13f335
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions autoload/airline/extensions/tabline/buffers.vim
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function! s:get_number(index)
endif
let bidx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0)
if bidx_mode > 1
return join(map(split(a:index+10, '\zs'), 'get(s:number_map, v:val, "")'), '')
return join(map(split(a:index+11, '\zs'), 'get(s:number_map, v:val, "")'), '')
else
return get(s:number_map, a:index+1, '')
endif
Expand Down Expand Up @@ -203,8 +203,8 @@ function! s:map_keys()
exe printf('noremap <silent> <Plug>AirlineSelectTab%d :call <SID>select_tab(%d)<CR>', i, i-1)
endfor
else
for i in range(10, 99)
exe printf('noremap <silent> <Plug>AirlineSelectTab%d :call <SID>select_tab(%d)<CR>', i, i-10)
for i in range(11, 99)
exe printf('noremap <silent> <Plug>AirlineSelectTab%d :call <SID>select_tab(%d)<CR>', i, i-11)
endfor
endif
noremap <silent> <Plug>AirlineSelectPrevTab :<C-u>call <SID>jump_to_tab(-v:count1)<CR>
Expand Down
4 changes: 2 additions & 2 deletions autoload/airline/extensions/tabline/tabs.vim
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ function! airline#extensions#tabline#tabs#map_keys()
exe printf('noremap <silent> <Plug>AirlineSelectTab%d :%dtabn<CR>', i, i)
endfor
else
for i in range(10, 99)
exe printf('noremap <silent> <Plug>AirlineSelectTab%d :%dtabn<CR>', i, i-9)
for i in range(11, 99)
exe printf('noremap <silent> <Plug>AirlineSelectTab%d :%dtabn<CR>', i, i-10)
endfor
endif
noremap <silent> <Plug>AirlineSelectPrevTab gT
Expand Down

0 comments on commit d13f335

Please sign in to comment.