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

Increase number CTRL-A #9506

Open
sete22stey opened this issue Mar 2, 2025 · 2 comments
Open

Increase number CTRL-A #9506

sete22stey opened this issue Mar 2, 2025 · 2 comments

Comments

@sete22stey
Copy link

Describe the bug
If the numbers to increase have a zero at the left and the last number is a 7 instead of increar a number increas a 3 numbers.

To Reproduce

  1. Write a number with zeros at the left and ending in 7 any number with the folowing format: 0xxx7. For examplo 017
  2. Try to increas one number using CTRL-A
  3. The result should be 018 but it is 020

Expected behavior
I expect to increas just one number, this behavior does not occur if you do not set the leading zero.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.29.0
  • VSCode version: 197.2
  • OS: Windows 10 / Ubuntu 24
@Bert210
Copy link

Bert210 commented Mar 5, 2025

When there is a leading zero it is using the base 8 which make 020 the correct next number after 017.

The same thing happens when you prefix a number with 0x19 the next number would be 0x1A.

I also tried it out in vim and the same thing happens 017 -> 020 and 0x19 -> 0x1a, in NeoVim it doesn't do the octal number system, but does do hex correctly.

I think this would be considered correct behavior, since the same thing happens in vim.

@xh3b4sd
Copy link

xh3b4sd commented Mar 6, 2025

There is already #8828.

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

No branches or pull requests

3 participants