initialCols (and initialRows) have an off-by-padding error #1515

Closed
opened 2026-01-30 22:29:21 +00:00 by claunia · 6 comments
Owner

Originally created by @adeolemon on GitHub (Jun 4, 2019).

Environment

Windows build number: 10.0.18908.1000
Windows Terminal version (if applicable): 880272c7483a3bb6893dbec3725d0eb7375ab78a

Steps to reproduce

  1. Set initialCols to 16
  2. Launch a new Terminal
  3. echo 0123456789abcdef

Expected behavior

echo's output oughtta fit in one line

Actual behavior

0123456789abcde
f
Originally created by @adeolemon on GitHub (Jun 4, 2019). # Environment ``` Windows build number: 10.0.18908.1000 Windows Terminal version (if applicable): 880272c7483a3bb6893dbec3725d0eb7375ab78a ``` # Steps to reproduce 0. Set `initialCols` to `16` 0. Launch a new Terminal 0. `echo 0123456789abcdef` # Expected behavior `echo`'s output oughtta fit in one line # Actual behavior ``` 0123456789abcde f ```
claunia added the Help WantedArea-SettingsIssue-BugNeeds-Tag-FixProduct-Terminal labels 2026-01-30 22:29:21 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jun 5, 2019):

Yea this is definitely wrong:
image

The area that you'd think is the rightmost column is actually the scrollbar. That space is always there, even if the scrollbar isn't expanded. That's maybe where I'd look to this being wrong.

@zadjii-msft commented on GitHub (Jun 5, 2019): Yea this is definitely wrong: ![image](https://user-images.githubusercontent.com/18356694/58961505-e040b480-876e-11e9-9172-4ecd4ebde10c.png) The area that you'd think is the rightmost column is actually the scrollbar. That space is always there, even if the scrollbar isn't expanded. That's maybe where I'd look to this being wrong.
Author
Owner

@Summon528 commented on GitHub (Jun 5, 2019):

The problem here is: what's the intended behavior for the hidden scroll bar. Is it intended to cover some text when expanded or is it intended to always have a reserved space? If it is (2) then the fix will be pretty easy, if it's (1) then we might need to modify the view tree

Edit: NVM I thought we had an always show scrollbar option

@Summon528 commented on GitHub (Jun 5, 2019): The problem here is: what's the intended behavior for the hidden scroll bar. Is it intended to cover some text when expanded or is it intended to always have a reserved space? If it is (2) then the fix will be pretty easy, if it's (1) then we might need to modify the view tree Edit: NVM I thought we had an always show scrollbar option
Author
Owner

@zadjii-msft commented on GitHub (Jun 5, 2019):

I think the scrollbar space is always supposed to be reserved (ie case number 2). We tried implementing a alwaysShowScrollbar option before we released as open-source, however, the UWP ScrollBar doesn't actually support a scrollbar styled like that. We'd have to roll our own implementation if we wanted that.

@zadjii-msft commented on GitHub (Jun 5, 2019): I think the scrollbar space is always supposed to be reserved (ie case number 2). We tried implementing a alwaysShowScrollbar option before we released as open-source, however, the UWP ScrollBar doesn't actually support a scrollbar styled like that. We'd have to roll our own implementation if we wanted that.
Author
Owner

@Summon528 commented on GitHub (Jun 5, 2019):

Weird enough I can't repro this anymore, although I think I did nothing. ( I can repro with padding set but I think that is intended? )

@Summon528 commented on GitHub (Jun 5, 2019): Weird enough I can't repro this anymore, although I think I did nothing. ( I can repro with padding set but I think that is intended? )
Author
Owner

@zadjii-msft commented on GitHub (Jun 5, 2019):

Ahhh, that's probably it. I have 2 padding on all sides set too. That's definitely not by design - we should be accounting for the amount of padding when calculating the initial window size.

@zadjii-msft commented on GitHub (Jun 5, 2019): Ahhh, that's probably it. I have 2 padding on all sides set too. That's definitely not by design - we should be accounting for the amount of padding when calculating the initial window size.
Author
Owner

@adeolemon commented on GitHub (Jun 5, 2019):

Yep, padding here too: "padding": "2, 2, 2, 2"

@adeolemon commented on GitHub (Jun 5, 2019): Yep, padding here too: `"padding": "2, 2, 2, 2"`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1515