microsoft / microsoft/terminal

Vim in WSL scrolls 3 lines when gaining focus with mouse click

Open
#5,310 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Input Area-VT Issue-Bug Priority-2 Product-Conhost
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

Environment

Windows build number: 10.0.18363.752
Windows Terminal version (if applicable): I am using native WSL terminal

Any other software? Vim

Steps to reproduce

I use Vim inside the default WSL terminal. When I click inside Vim to regain focus on the terminal, then it scrolls down 3 lines. This doesn't happen if gain focus using control tab or if I click somewhere inside Vim when I already have the terminal focused.

Expected behavior

Vim should not scroll.

Actual behavior

Vim scrolls down 3 lines.
Gif for clarity: https://i.redd.it/vxyk7h9bpyr41.gif

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

Start by reproducing the issue in the default WSL terminal with Vim, comparing a mouse click that restores focus with Ctrl+Tab and a click while the terminal is already focused. Done means restoring focus with a click no longer scrolls Vim by three lines.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.