From f4381fb748fb3ba294efbdf5de416791048fddc3 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 11 Sep 2016 12:04:08 +0900 Subject: [PATCH] Fix loading on c-operator Close #518 --- plug.vim | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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, ...)