Unexpected Right Padding in TUIs even though Scrollbar is Hidden by Default
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.
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.
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.
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.
So, okay, yes. This one is "by bad design".
Right now, profiles.defaults is used to derive the settings for any unknown application that gets launched into Terminal.
For now, I'd recommend moving the settings you care to apply to all applications to your defaults rather than to your default profile.
You could also just make a hidden profile with a commandline of path/to/nvim.exe and hidden: true, and I suspect that Terminal would match defterm launches for nvim to that... but that seems like a strictly goofier solution
Right now,
profiles.defaultsis used to derive the settings for any unknown application that gets launched into Terminal.For now, I'd recommend moving the settings you care to apply to all applications to your
defaultsrather than to your default profile.
This was my expectation. But it's the opposite behavior I'm observing; hence the bug report.