VSCodeVim / VSCodeVim/Vim

Selected region changes after pressing ctrl-b twice

Open
#3,835 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 boundary of a selected region would change by pressing ctrl-b twice to scroll two pages up.

To Reproduce
Steps to reproduce the behavior:

  1. Prepare a file with sufficient length.
  2. G: go to the end of the file.
  3. V: select the current line.
  4. ctrl-b ctrl-b
  5. Scroll down with a mouse and you will see that the selection boundary changes and is not at the end of the file.

Expected behavior
Vim and Neovim would preserve the correct selection range, which is from the current cursor position to the end of the file.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: v1.8.1
  • VSCode version: 1.35.1
  • OS: macOS 10.14

Additional context
This bug only occurs when ctrl-b is used in visual mode, ctrl-f is not affected.
The input sequence ctrl-b followed by j or k also results in strange behaviour.

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

No file, test, or code entry point is named. First reproduce the sequence in the issue—visual selection, G, ctrl-b twice, then mouse scrolling—and inspect the visual-mode handling involved; done means the selection remains from the cursor position to the end of the file, including after ctrl-b followed by j or k.

Written by the indexing model from the issue text.

Assessment

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