Skip to content

Commit 6acc0ae

Browse files
committed
Merge pull request #45 from blueyed/use-nowait-mappings
Use `<nowait>` with mappings
2 parents 88e4a9b + c29a349 commit 6acc0ae

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

plugin/undotree.vim

+8-1
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,15 @@ function! s:undotree.Init()
350350
endfunction
351351

352352
function! s:undotree.BindKey()
353+
if v:version > 703 || (v:version == 703 && has("patch1261"))
354+
let map_options = '<nowait> '
355+
else
356+
let map_options = ''
357+
endif
353358
for i in s:keymap
354-
silent exec 'nnoremap <silent> <script> <buffer> '.i[1].' :call <sid>undotreeAction("'.i[0].'")<cr>'
359+
silent exec 'nnoremap <silent> <script> <buffer> '
360+
\ .map_options
361+
\ .i[1].' :call <sid>undotreeAction("'.i[0].'")<cr>'
355362
endfor
356363
if exists('*g:Undotree_CustomMap')
357364
call g:Undotree_CustomMap()

0 commit comments

Comments
 (0)