Force <nowait> for all generated maps

This commit is contained in:
Tim Pope 2019-08-13 23:32:15 -04:00
parent 5defa72b81
commit 1359d620eb

View File

@ -165,7 +165,7 @@ function! s:Map(mode, lhs, rhs, ...) abort
let head = substitute(head, '<[^<>]*>$\|.$', '', '') let head = substitute(head, '<[^<>]*>$\|.$', '', '')
endwhile endwhile
if flags !~# '<unique>' || empty(mapcheck(head.tail, a:mode)) if flags !~# '<unique>' || empty(mapcheck(head.tail, a:mode))
exe a:mode.'map <buffer>' flags head.tail a:rhs exe a:mode.'map <buffer>' s:nowait flags head.tail a:rhs
if a:0 > 1 if a:0 > 1
let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'exe') . let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'exe') .
\ '|sil! exe "' . a:mode . 'unmap <buffer> ' . head.tail . '"' \ '|sil! exe "' . a:mode . 'unmap <buffer> ' . head.tail . '"'