Map keys in ctrlspace mode

fixes #1181
This commit is contained in:
Christian Brabandt 2016-07-03 21:09:42 +02:00
parent a710cb99dd
commit a6c04644ef
2 changed files with 3 additions and 2 deletions

View File

@ -95,6 +95,7 @@ endfunction
function! airline#extensions#tabline#ctrlspace#get() function! airline#extensions#tabline#ctrlspace#get()
let cur_buf = bufnr('%') let cur_buf = bufnr('%')
call airline#extensions#tabline#tabs#map_keys()
let s:tab_list = ctrlspace#api#TabList() let s:tab_list = ctrlspace#api#TabList()
for tab in s:tab_list for tab in s:tab_list
if tab.current if tab.current

View File

@ -34,7 +34,7 @@ endfunction
function! airline#extensions#tabline#tabs#get() function! airline#extensions#tabline#tabs#get()
let curbuf = bufnr('%') let curbuf = bufnr('%')
let curtab = tabpagenr() let curtab = tabpagenr()
call s:map_keys() call airline#extensions#tabline#tabs#map_keys()
if curbuf == s:current_bufnr && curtab == s:current_tabnr if curbuf == s:current_bufnr && curtab == s:current_tabnr
if !g:airline_detect_modified || getbufvar(curbuf, '&modified') == s:current_modified if !g:airline_detect_modified || getbufvar(curbuf, '&modified') == s:current_modified
return s:current_tabline return s:current_tabline
@ -94,7 +94,7 @@ function! airline#extensions#tabline#tabs#get()
return s:current_tabline return s:current_tabline
endfunction endfunction
function! s:map_keys() function! airline#extensions#tabline#tabs#map_keys()
noremap <silent> <Plug>AirlineSelectTab1 :1tabn<CR> noremap <silent> <Plug>AirlineSelectTab1 :1tabn<CR>
noremap <silent> <Plug>AirlineSelectTab2 :2tabn<CR> noremap <silent> <Plug>AirlineSelectTab2 :2tabn<CR>
noremap <silent> <Plug>AirlineSelectTab3 :3tabn<CR> noremap <silent> <Plug>AirlineSelectTab3 :3tabn<CR>