Skip to content

Commit

Permalink
Merge pull request #45 from blueyed/use-nowait-mappings
Browse files Browse the repository at this point in the history
Use `<nowait>` with mappings
  • Loading branch information
mbbill committed Dec 7, 2014
2 parents 88e4a9b + c29a349 commit 6acc0ae
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 6acc0ae

Please sign in to comment.