diff --git a/plug.vim b/plug.vim index d6f7afc..1dee361 100644 --- a/plug.vim +++ b/plug.vim @@ -508,14 +508,17 @@ function! s:lod_map(map, names, prefix) endif let extra .= nr2char(c) endwhile - if v:count - call feedkeys(v:count, 'n') - endif - call feedkeys('"'.v:register, 'n') + + let prefix = v:count ? v:count : '' + let prefix .= '"'.v:register.a:prefix if mode(1) == 'no' - call feedkeys(v:operator) + if v:operator == 'c' + let prefix = "\" . prefix + endif + let prefix .= v:operator endif - call feedkeys(a:prefix . substitute(a:map, '^', "\", '') . extra) + call feedkeys(prefix, 'n') + call feedkeys(substitute(a:map, '^', "\", '') . extra) endfunction function! plug#(repo, ...)