VSCodeVim / VSCodeVim/Vim

`dl` on last character of line deletes newline when `whichwrap=l`

Open
#4,144 0 comments 1 reaction 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
With whichwrap configured with the l flag, when the cursor is positioned on the last character in a line and the command dl is entered, both the the last character on the line and the newline are deleted.

To Reproduce
Steps to reproduce the behavior:

  1. Configure "vim.whichwrap": "h,l"
  2. Open a file with several lines of text
  3. Type "$dl" on the first line
  4. See that the last character and the newline for the first line have been deleted.

Expected behavior
Only the last character should have been deleted.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.11
  • VSCode version: 1.39-insider
  • OS: macOS/Linux/Windows

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 with "vim.whichwrap": "h,l" in a file containing several lines, place the cursor on the first line's last character with $, and run dl. Done means only the last character is deleted while the newline remains intact.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.