microsoft / microsoft/terminal

Unexpected Right Padding in TUIs even though Scrollbar is Hidden by Default

Open
#18,872 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Needs-Attention Needs-Triage
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### Windows Terminal version

1.22.11141.0

### Windows build number

10.0.22631.0

### Other Software

neovim 0.11.1

### Steps to reproduce

## Setup:

On **Defaults** > **Appearance** page:

- **Window Padding** is set to _0_
- **Scrollbar visibility** is set to _Hidden_

On default profile **PowerShell** > **Appearance** page:

- **Scrollbar visibility** is set to _Visible_

- **Restart the terminal**

### Expected Behavior

When I run `nvim` via PowerShell, I see the padding reserved for the scrollbar area, which is understandable.
**However, I wish TUIs could take over the whole window.**

![Image](https://github.com/user-attachments/assets/aa500b31-816b-4463-b574-944107b01b85)

### Actual Behavior

### The Issue

If I run `nvim.exe` directly by double-clicking it, there's an unexpected gap on the right. **It's smaller than the scrollbar padding.** This gap corrects itself if I slightly resize the window from the right edge.

![Image](https://github.com/user-attachments/assets/6bd2182c-610c-463f-b217-f39707e24d33)

This seems like a bug to me. I originally commented it on [#18582](https://github.com/microsoft/terminal/issues/18582#issuecomment-2845836596).

Here's the reply I got from @j4james in [#18582](https://github.com/microsoft/terminal/issues/18582#issuecomment-2846078888)

> I assume what's happening here is you've set your default profile as PowerShell, so when opening a new instance of the terminal, the initial size is based on the PowerShell profile, i.e. with a _visible_ scrollbar.
>
> However, when launching an arbitrary executable, the tab that will be created for that app will use the profile default settings, which have the scrollbar _hidden_. And if the window is already created at that point, a tab without a scrollbar will not fill the available space.
>
> Now it's arguable that if you're creating a brand new terminal with an arbitrary executable, the initial window size should have been based on the default settings, rather than the settings of the default profile. So that may well be a bug, although it might also be by design.
>
> If it bothers you, I'd recommend opening an issue for this and see what the core devs have to say.

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 source file or test is named. First reproduce the issue by launching nvim.exe directly with the stated Windows Terminal and profile settings, then compare it with launching nvim through PowerShell; done means the unintended right-side gap is resolved or its intended behavior is clarified.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli, desktop
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.