From 2e3cdeb808bff6cd2db0b05c8bdb3530400eb23b Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Thu, 4 Jan 2018 13:59:47 +0100 Subject: [PATCH] tabline: try/catch mapping of the keys fixes #1621 --- autoload/airline/extensions/tabline/buffers.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autoload/airline/extensions/tabline/buffers.vim b/autoload/airline/extensions/tabline/buffers.vim index 74bff1fe..ffcf7b85 100644 --- a/autoload/airline/extensions/tabline/buffers.vim +++ b/autoload/airline/extensions/tabline/buffers.vim @@ -3,7 +3,7 @@ scriptencoding utf-8 -let s:buffer_idx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) +let s:buffer_idx_mode = get(g:, 'airline#extensions#tabline#buffer_idx_mode', 1) let s:show_tab_type = get(g:, 'airline#extensions#tabline#show_tab_type', 1) let s:buffers_label = get(g:, 'airline#extensions#tabline#buffers_label', 'buffers') let s:keymap_ignored_filetypes = get(g:, 'airline#extensions#tabline#keymap_ignored_filetypes', ['vimfiler', 'nerdtree']) @@ -50,7 +50,11 @@ function! airline#extensions#tabline#buffers#invalidate() endfunction function! airline#extensions#tabline#buffers#get() - call map_keys() + try + call map_keys() + catch + " no-op + endtry let cur = bufnr('%') if cur == s:current_bufnr if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified