mirror of
https://github.com/preservim/tagbar.git
synced 2025-02-16 11:13:01 +08:00
Define mappings with <nowait> if available, closes #299
This commit is contained in:
parent
040e8400af
commit
a1f416edde
|
@ -1010,6 +1010,11 @@ function! s:MapKeys() abort
|
|||
\ ['help', 'ToggleHelp()'],
|
||||
\ ]
|
||||
|
||||
let map_options = ' <script> <silent> <buffer> '
|
||||
if v:version > 703 || (v:version == 703 && has('patch1261'))
|
||||
let map_options .= ' <nowait> '
|
||||
endif
|
||||
|
||||
for [map, func] in maps
|
||||
let def = get(g:, 'tagbar_map_' . map)
|
||||
if type(def) == type("")
|
||||
|
@ -1018,7 +1023,7 @@ function! s:MapKeys() abort
|
|||
let keys = def
|
||||
endif
|
||||
for key in keys
|
||||
execute 'nnoremap <script> <silent> <buffer> ' . key .
|
||||
execute 'nnoremap' . map_options . key .
|
||||
\ ' :call <SID>' . func . '<CR>'
|
||||
endfor
|
||||
unlet def
|
||||
|
|
Loading…
Reference in New Issue
Block a user