diff --git a/plugin/wordmotion.vim b/plugin/wordmotion.vim index 8aa633d..3c79971 100644 --- a/plugin/wordmotion.vim +++ b/plugin/wordmotion.vim @@ -52,7 +52,12 @@ for s:_.motion in s:_.motions let s:_.f = printf("'%s'", s:_.flags[tolower(s:_.motion)]) let s:_.u = s:_.motion =~# '\u' let s:_.args = join(['v:count1', s:_.m, s:_.f, s:_.u, '[]'], ', ') - let s:_.rhs = printf(':call wordmotion#motion(%s)', s:_.args) + if s:_.mode ==# 'x' + let s:_.rhs = printf(':call wordmotion#motion(%s)', s:_.args) + else + " avoid showing the cmdline call in dot-repeat + let s:_.rhs = printf('call wordmotion#motion(%s)', s:_.args) + endif execute s:_.mode . 'noremap' '' s:_.map s:_.rhs call s:_.add_existing(s:_.mode, s:_.map, s:_.rhs) if s:_.nomap @@ -80,7 +85,12 @@ for s:_.motion in s:_.motions let s:_.i = s:_.inner[tolower(s:_.motion)] let s:_.u = s:_.motion =~# '\u' let s:_.args = join(['v:count1', s:_.m, s:_.i, s:_.u], ', ') - let s:_.rhs = printf(':call wordmotion#object(%s)', s:_.args) + if s:_.mode ==# 'x' + let s:_.rhs = printf(':call wordmotion#object(%s)', s:_.args) + else + " avoid showing the cmdline call in dot-repeat + let s:_.rhs = printf('call wordmotion#object(%s)', s:_.args) + endif execute s:_.mode . 'noremap' '' s:_.map s:_.rhs call s:_.add_existing(s:_.mode, s:_.map, s:_.rhs) if s:_.nomap