Vim icon indicating copy to clipboard operation
Vim copied to clipboard

Repeatable dot of insert action results improper output

Open s-kai273 opened this issue 11 months ago • 3 comments

Repeatable dot of some insert action generates different output from original vim one. For instance, the last action is inserting text of var, and try 3. on a blank line.

  • Expectation: varvarvar
  • Actual: vavavarrr

This is probably a cursor position issue...

s-kai273 avatar Mar 14 '24 00:03 s-kai273

I tested it with my vscodevim, vim and nvim, and they showed the exact same behaviour as you described.

However with append a instead of insert i I can achieve what you wanted, maybe you can try that?

shinohara-rin avatar Mar 14 '24 21:03 shinohara-rin

@shinohara-rin Thanks for your comment. I confirmed the expected output when using a.

The background of making this issue is encountering the behavior on coding dot test of normal command(I implemented normal command and it is being reviewed now). The code is line 51 of normalCommand.test.js in next url. https://github.com/VSCodeVim/Vim/pull/8896/files#diff-941bf1758a5c88c0d4b9d9734e254d0aba2ed4a54bccafc9daed6908277a7fbd

I'm wondering which expectation, the behavior of above issue or original vim, is better... If it is solved easily, I would like to adopt the original one.

Another similar issue is replace action of dot command. For instance, prepare a text of aaaaa and try 3. of replacing any charactor to b with first charactor of cursor position. Result of original vim is bbbaa but actual one is baaaa...

s-kai273 avatar Mar 15 '24 12:03 s-kai273

I fixed repeatable dot bug on https://github.com/VSCodeVim/Vim/pull/8979. Hope someone to review it.

s-kai273 avatar Apr 07 '24 15:04 s-kai273