Terminal: initialCols (and initialRows) have an off-by-padding error

Created on 5 Jun 2019  路  6Comments  路  Source: microsoft/terminal

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
Area-Settings Help Wanted Issue-Bug Needs-Tag-Fix Product-Terminal

Most helpful comment

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.

All 6 comments

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.

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

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.

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? )

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

NOFUNEVER picture NOFUNEVER  路  106Comments

migueldeicaza picture migueldeicaza  路  58Comments

Ronkiro picture Ronkiro  路  65Comments

DHowett-MSFT picture DHowett-MSFT  路  285Comments

Paul-Weisser picture Paul-Weisser  路  71Comments