Skip to content

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

Open
@ni554n

Description

@ni554n

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

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

This seems like a bug to me. I originally commented it on #18582.

Here's the reply I got from @j4james in #18582

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.Needs-AttentionThe core contributors need to come back around and look at this ASAP.Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions