From 62952b3887b9608baf3ca494b5a2bf58018257dd Mon Sep 17 00:00:00 2001 From: Christian Brabandt Date: Tue, 27 Jun 2017 14:44:03 +0200 Subject: [PATCH] tabline: only map keys if not done yet Should improve performance by not steadily remapping keys --- autoload/airline/extensions/tabline/tabs.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/autoload/airline/extensions/tabline/tabs.vim b/autoload/airline/extensions/tabline/tabs.vim index 63beee1..b2ddf87 100644 --- a/autoload/airline/extensions/tabline/tabs.vim +++ b/autoload/airline/extensions/tabline/tabs.vim @@ -97,6 +97,9 @@ function! airline#extensions#tabline#tabs#get() endfunction function! airline#extensions#tabline#tabs#map_keys() + if exists("s:airline_tabline_map_key") + return + endif noremap AirlineSelectTab1 :1tabn noremap AirlineSelectTab2 :2tabn noremap AirlineSelectTab3 :3tabn @@ -109,4 +112,5 @@ function! airline#extensions#tabline#tabs#map_keys() noremap AirlineSelectPrevTab gT " tabn {count} goes to count tab does not go {count} tab pages forward! noremap AirlineSelectNextTab :exe repeat(':tabn\|', v:count1) + let s:airline_tabline_map_key = 1 endfunction