microsoft / microsoft/terminal

SetConsoleWindowInfo doesn't scroll visible region in Terminal

Open
#10,191 11 comments 0 reactions 0 assignees View on GitHub
Area-Input Issue-Bug Priority-2 Product-Terminal
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version (or Windows build number)

1.9.1445.0

### Other Software

Yori (but only as a means to disable quickedit and call ReadConsoleInput, you might have something better)

### Steps to reproduce

1. Ensure quickedit is disabled, so mouse events are processed by the application.
2. Attempt to scroll the viewport with the mouse wheel.

### Expected Behavior

In conhost, using the mouse wheel when quickedit is disabled still moves the viewport transparently to the application.

This means that any TUI application wanting to implement mouse wheel logic itself is essentially forced to use CreateConsoleScreenBuffer/SetConsoleActiveScreenBuffer to ensure that the viewport has nothing to scroll.

### Actual Behavior

In Terminal, using the mouse wheel when quickedit is disabled notifies the program and does not move the viewport.

This means that any CLI application is forced to handle mouse wheel notifications and call SetConsoleWindowInfo as needed. I don't even know if this works on Terminal (the documentation suggests it might not.)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the mouse-wheel behavior with quickedit disabled, comparing Terminal with conhost and observing ReadConsoleInput notifications. Trace the handling of SetConsoleWindowInfo and viewport scrolling, then verify that the Terminal behavior matches the expected transparent scrolling without requiring applications to handle the wheel themselves.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
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.