Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeatable dot of insert action results improper output #8938

Closed
s-kai273 opened this issue Mar 14, 2024 · 3 comments · Fixed by #8979
Closed

Repeatable dot of insert action results improper output #8938

s-kai273 opened this issue Mar 14, 2024 · 3 comments · Fixed by #8979

Comments

@s-kai273
Copy link
Contributor

s-kai273 commented Mar 14, 2024

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...

@shinohara-rin
Copy link
Contributor

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?

@s-kai273
Copy link
Contributor Author

@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 s-kai273 mentioned this issue Apr 7, 2024
2 tasks
@s-kai273
Copy link
Contributor Author

s-kai273 commented Apr 7, 2024

I fixed repeatable dot bug on #8979.
Hope someone to review it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants