tabline: add more try/catch for mappings

similar to 2e3cdeb808 add a couple of more try catch statements
around the map_keys() function
This commit is contained in:
Christian Brabandt 2018-01-04 18:15:40 +01:00
parent 645f65d8d9
commit 69aa1e93b3
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 10 additions and 2 deletions

View File

@ -105,7 +105,11 @@ function! airline#extensions#tabline#ctrlspace#get()
let tab_label = get(g:, 'airline#extensions#tabline#tabs_label', 'tabs')
let switch_buffers_and_tabs = get(g:, 'airline#extensions#tabline#switch_buffers_and_tabs', 0)
try
call airline#extensions#tabline#tabs#map_keys()
catch
" no-op
endtry
let s:tab_list = ctrlspace#api#TabList()
for tab in s:tab_list
if tab.current

View File

@ -36,7 +36,11 @@ endfunction
function! airline#extensions#tabline#tabs#get()
let curbuf = bufnr('%')
let curtab = tabpagenr()
try
call airline#extensions#tabline#tabs#map_keys()
catch
" no-op
endtry
if curbuf == s:current_bufnr && curtab == s:current_tabnr
if !g:airline_detect_modified || getbufvar(curbuf, '&modified') == s:current_modified
return s:current_tabline