# vim: Fix increment/decrement for negative numbers without gaps \(\#58327\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/95dfe8ca6dafd576122686d5ea1455d4cef0de58)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 95dfe8ca6dafd576122686d5ea1455d4cef0de58

Requested commit: 95dfe8ca6dafd576122686d5ea1455d4cef0de58

Commit: 95dfe8ca6dafd576122686d5ea1455d4cef0de58

Tree: 099b37ddb6a49bbab4a13c2619acfe8b97253569

Author: Stefan Bethge

Committer: GitHub

## Message

```
vim: Fix increment/decrement for negative numbers without gaps (#58327)

Finally continuing from PR #35200:

I adapted the fix to the changed find_target() logic and added more
tests for version strings like `0.82.46`.
This is a different but similar fix compared to #47356 for helix mode -
not sure if this can and should be unified?

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
(should not affect UI at all)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #35193 

Release Notes:

- Fixed vim's increment (`ctrl-a`) and decrement (`ctrl-x`) commands
skipping the number under the cursor in dotted strings like version
numbers (e.g. `0.81.46`) and hyphened date strings (e.g. `2015-02-01`)

---------

Co-authored-by: Stefan Bethge <kjyv@users.noreply.github.com>
Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
Co-authored-by: dino <dinojoaocosta@gmail.com>
```

## Parents

- [8ed0f5f05aec6d868205df2326b29f5459e3a400](https://git.cafe/gitcafe/zed/commit/8ed0f5f05aec6d868205df2326b29f5459e3a400?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/95dfe8ca6dafd576122686d5ea1455d4cef0de58?format=markdown)
