VSCodeVim / VSCodeVim/Vim

Expanding a selection has odd behavior over empty lines

Open
#5,439 0 comments 0 reactions 0 assignees View on GitHub

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

The easiest description is a gif:
Screen Cast 2020-10-16 at 6 20 02 PM

In the first expansion of the selection from top to bottom (after the first couple of seconds which are resetting the cursor), the selection skips over the empty line, and then requires an additional j to resume its expansion.

In the second, the selection starts with shift+v, and has expected behavior.

As you can see, this isn't a bad bug; the only impact is visual rather than semantic. But posting here as a hopefully helpful report.

Expected behavior
I would expect the same behavior over the empty line whether starting with v or shift+v.

  • Extension (VsCodeVim) version: 1.17.1
  • VSCode:
    • Version: 1.50.1
    • Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a
    • Date: 2020-10-13T14:53:05.704Z (3 days ago)
    • Electron: 9.2.1
    • Chrome: 83.0.4103.122
    • Node.js: 12.14.1
    • V8: 8.3.110.13-electron.0
    • OS: Darwin x64 19.6.0

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

The issue names no files or tests. First reproduce the selection behavior in VSCodeVim using v and shift+v across an empty line, then trace the visual-selection entry points and existing tests. Done means both starting modes expand consistently over the empty line without changing semantic selection behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, 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.