diff --git a/autoload/repeat.vim b/autoload/repeat.vim index 245a189..8fd9df5 100644 --- a/autoload/repeat.vim +++ b/autoload/repeat.vim @@ -103,9 +103,10 @@ function! repeat#run(count) call feedkeys((a:count ? a:count : '') . '.', 'ni') endif endif - catch /^Vim\%((\a\+)\)\=:E\%(384\|385\|486\)/ - echohl ErrorMsg | echo substitute(v:exception, '^Vim\%((\a\+)\)\=:', '', '') | echohl None + catch /^Vim(normal):/ + return 'echoerr v:errmsg' endtry + return '' endfunction function! repeat#wrap(command,count) @@ -116,7 +117,7 @@ function! repeat#wrap(command,count) endif endfunction -nnoremap (RepeatDot) :call repeat#run(v:count) +nnoremap (RepeatDot) :exe repeat#run(v:count) nnoremap (RepeatUndo) :call repeat#wrap('u',v:count) nnoremap (RepeatUndoLine) :call repeat#wrap('U',v:count) nnoremap (RepeatRedo) :call repeat#wrap("\C-R>",v:count)