1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-17 11:30:28 +01:00

Better mapping init, closes #203

If someone already has a function that includes "JumpToTag" in its name
then the current method of detecting whether mappings should be
initialized would fail. Use a buffer-local variable instead.
This commit is contained in:
Jan Larres
2014-04-05 19:08:54 +13:00
parent 87d0111bd3
commit ae46cc025b

View File

@@ -957,6 +957,8 @@ function! s:MapKeys() abort
endfor
unlet def
endfor
let b:tagbar_mapped_keys = 1
endfunction
" s:CreateAutocommands() {{{2
@@ -1820,7 +1822,7 @@ function! s:InitWindow(autoclose) abort
let cpoptions_save = &cpoptions
set cpoptions&vim
if !hasmapto('JumpToTag', 'n')
if !exists('b:tagbar_mapped_keys')
call s:MapKeys()
endif