VSCodeVim / VSCodeVim/Vim

`das` deletes more than it should

Open
#5,908 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
When using delete a sentence on a sentence that ends with a newline, the first character of the next line is also deleted. This only happens when the cursor is not on the first non-whitespace character of the line that is being deleted.

To Reproduce
Steps to reproduce the behavior:

  1. Create a file containing:
First sentence.
Second sentence.
Third sentence.
  1. Put cursor on the second character of Second sentence. In this case, 'e'.
  2. delete a sentence.
  3. The Second sentence. and T of the third line are deleted.
First sentence.
hird sentence.

Expected behavior
Only Second sentence. should be deleted.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.18.5
  • VSCode version: 1.52.1
  • OS: Windows 10 Pro

Also tested on fresh install of Visual Studio Code - Insiders

  • Extension (VsCodeVim) version: 1.18.5
  • VSCode version: 1.53.0-insider
  • OS: Windows 10 Pro

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in VSCodeVim using the reported three-line file, placing the cursor on the second character of the middle sentence before running das. Trace the sentence-motion and deletion handling from that behavior; done means only the targeted sentence is removed and the first character of the next line remains.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.