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

fix: respect updated v:count when using . repeat #253

Merged
merged 1 commit into from
Oct 8, 2022
Merged

fix: respect updated v:count when using . repeat #253

merged 1 commit into from
Oct 8, 2022

Conversation

numToStr
Copy link
Owner

@numToStr numToStr commented Oct 7, 2022

Previously, when you press 3gcc 3 lines will be (un)commented then pressing . also (un)comments 3 lines. This is fine. But if you press 4. (prefixing the . with a count) it (un)comments 3 lines instead of 4 which is wrong. As . repeat should respect the updated value of the v:count, in this case, 4 should be used instead of 3.

With this PR, . will respect the updated value of v:count by removing an old workaround. This PR also replaces vim.v.count with vim.api.nvim_get_vvar('count').

@numToStr numToStr changed the title feat: respect updated v:count value when using . repeat feat: respect updated v:count when using . repeat Oct 7, 2022
@numToStr numToStr force-pushed the count branch 2 times, most recently from 61d716d to 11402f7 Compare October 7, 2022 13:15
@numToStr numToStr changed the title feat: respect updated v:count when using . repeat fix: respect updated v:count when using . repeat Oct 7, 2022
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 this pull request may close these issues.

1 participant