Skip to content

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
@numToStr numToStr merged commit e42e290 into master Oct 8, 2022
@numToStr numToStr deleted the count branch October 8, 2022 06:41
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.

2 participants