From 69aa1e93b345ac139d94be0e6e6440a36d0d24db Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 4 Jan 2018 18:15:40 +0100 Subject: [PATCH] tabline: add more try/catch for mappings similar to 2e3cdeb808bf add a couple of more try catch statements around the map_keys() function --- autoload/airline/extensions/tabline/ctrlspace.vim | 6 +++++- autoload/airline/extensions/tabline/tabs.vim | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/autoload/airline/extensions/tabline/ctrlspace.vim b/autoload/airline/extensions/tabline/ctrlspace.vim index 582bd26..98a166a 100644 --- a/autoload/airline/extensions/tabline/ctrlspace.vim +++ b/autoload/airline/extensions/tabline/ctrlspace.vim @@ -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) - call airline#extensions#tabline#tabs#map_keys() + 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 diff --git a/autoload/airline/extensions/tabline/tabs.vim b/autoload/airline/extensions/tabline/tabs.vim index b2ddf87..3edba2d 100644 --- a/autoload/airline/extensions/tabline/tabs.vim +++ b/autoload/airline/extensions/tabline/tabs.vim @@ -36,7 +36,11 @@ endfunction function! airline#extensions#tabline#tabs#get() let curbuf = bufnr('%') let curtab = tabpagenr() - call airline#extensions#tabline#tabs#map_keys() + 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