d[count]as leaves additional whitespace depending on cursor position
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Describe the bug
hi i just started vim 2 hours ago so if its on me idk
what ive found is that if you have for example 4 sentences, you put cursor on the middle of sentence 2, then do d2as or 2das it will leave an additional blankspace.
To Reproduce
Steps to reproduce the behavior:
- type at least 4 sentences of your preferred language. use . (dot) to signify its a sentence
- move to middle of sentence 2
- try to delete every subsequent sentences but the last ([count]das) where count is (4) - 2
- See two whitespaces
Expected behavior
one whitespace.
Screenshots
Environment:
- Extension (VsCodeVim) version: 1.29.0
- VSCode version: 1.98.2
- OS: windows 11 24h2
Additional context
- you can test with only 3 sentences, with cursor in middle of first sentence do d2as. error will happen but its going to be less evident.
- expected behavior on vim
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
First reproduce the counted d2as and 2das cases in VSCodeVim using the four-sentence example, with the cursor in the positions described. Then trace the implementation of the d[count]as text-object handling and any related tests; done means deleting subsequent sentences leaves exactly one whitespace, matching Vim behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100