Skip to content

Commit

Permalink
Use <nowait> with mappings
Browse files Browse the repository at this point in the history
Fixes #44
  • Loading branch information
blueyed committed Dec 6, 2014
1 parent 88e4a9b commit c29a349
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion plugin/undotree.vim
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,15 @@ function! s:undotree.Init()
endfunction

function! s:undotree.BindKey()
if v:version > 703 || (v:version == 703 && has("patch1261"))
let map_options = '<nowait> '
else
let map_options = ''
endif
for i in s:keymap
silent exec 'nnoremap <silent> <script> <buffer> '.i[1].' :call <sid>undotreeAction("'.i[0].'")<cr>'
silent exec 'nnoremap <silent> <script> <buffer> '
\ .map_options
\ .i[1].' :call <sid>undotreeAction("'.i[0].'")<cr>'
endfor
if exists('*g:Undotree_CustomMap')
call g:Undotree_CustomMap()
Expand Down

0 comments on commit c29a349

Please sign in to comment.