initialRows/initialColumns still doesn't work quite right #11735

Open
opened 2026-01-31 02:56:01 +00:00 by claunia · 17 comments
Owner

Originally created by @angelog0 on GitHub (Dec 8, 2020).

By default WT starts with `"initialRows": 30', and this is true when there is not the tab row. After opening the first tab, tha tab row shows up and WT really displays 28 rows (it conserves the window height).

Is there an option to conserve the `initiaRows', 30, for example? (the window height should increase a bit).

Originally created by @angelog0 on GitHub (Dec 8, 2020). By default WT starts with `"initialRows": 30', and this is true when there is not the tab row. After opening the first tab, tha tab row shows up and WT really displays 28 rows (it conserves the window height). Is there an option to conserve the `initiaRows', 30, for example? (the window height should increase a bit).
Author
Owner

@zadjii-msft commented on GitHub (Dec 9, 2020):

We were originally tracking this with #2061. I thought this was fixed in #4825. Are you using "showTabsInTitlebar": false?

@zadjii-msft commented on GitHub (Dec 9, 2020): We were originally tracking this with #2061. I _thought_ this was fixed in #4825. Are you using `"showTabsInTitlebar": false`?
Author
Owner

@angelog0 commented on GitHub (Dec 9, 2020):

Are you using "showTabsInTitlebar": false

I use:

"alwaysShowTabs": false, 
"showTabsInTitlebar": false,

and want a title bar + a tab bar(when there are tabs) + 30 rows (always): the terminal should increase its vertical dimension when tab bar shows up so that it displays always 30 rows of text.

The current behavior is that the vertical dimension is static and when tab row shows up the space of 2 rows are taken by the tab row so that the true text displayed is 28 rows.

@angelog0 commented on GitHub (Dec 9, 2020): > Are you using "showTabsInTitlebar": false I use: ``` "alwaysShowTabs": false, "showTabsInTitlebar": false, ``` and want a title bar + a tab bar(when there are tabs) + 30 rows (always): the terminal should increase its vertical dimension when tab bar shows up so that it displays always 30 rows of text. The current behavior is that the vertical dimension is static and when tab row shows up the space of 2 rows are taken by the tab row so that the true text displayed is 28 rows.
Author
Owner

@ghost commented on GitHub (Dec 14, 2020):

S stands for showTabsInTitlebar
A stands for alwaysShowTabs
T stands for true
F stands for false

  • Using both properties
    S A
    T T 30
    T F 30
    F T 28
    F F 30

  • Using one of the property(e.g only showTabsInTitlebar or only alwaysShowTabs)
    showTabsInTitlebar: true -> 30
    showTabsInTitlebar: false -> 28
    alwaysShowTabs true -> 30
    alwaysShowTabs: false -> 30

It seems like there are two cases that would make row only 28. For my machine settings both false shows 30 rows.
Do you want these two cases would show 30 rows as well ?

@ghost commented on GitHub (Dec 14, 2020): S stands for `showTabsInTitlebar` A stands for `alwaysShowTabs` T stands for `true` F stands for `false` - Using both properties S A T T 30 T F 30 _**F T 28**_ F F 30 - Using one of the property(e.g only showTabsInTitlebar or only alwaysShowTabs) showTabsInTitlebar: true -> 30 **_showTabsInTitlebar: false -> 28_** alwaysShowTabs true -> 30 alwaysShowTabs: false -> 30 It seems like there are two cases that would make row only 28. For my machine settings both `false` shows 30 rows. Do you want these two cases would show 30 rows as well ?
Author
Owner

@zadjii-msft commented on GitHub (Dec 14, 2020):

Just for legibility's sake:

showTabsInTitlebar alwaysShowTabs rows
T T 30
T F 30
F T 28
F F 30

I'm pretty sure that this is just a coincidence that it's 2 rows. If the font size is bigger or smaller, you might end up seeing only one row of difference, or 3 rows.

Plus, I think we should already be handling this:

d02812d699/src/cascadia/TerminalApp/AppLogic.cpp (L567-L598)

I'd guess that since that code was written, something in the TabRowControl regressed. Maybe a MUX update changed how a TabView Measures without any tabs in it. Can't say for sure. But I'd start by investigating why that code path is returning the wrong value.

@zadjii-msft commented on GitHub (Dec 14, 2020): Just for legibility's sake: | `showTabsInTitlebar` | `alwaysShowTabs` | rows | | -- | -- | -- | | T | T | 30 | | T | F | 30 | | F | T | **28** | | F | F | 30 | I'm pretty sure that this is just a coincidence that it's 2 rows. If the font size is bigger or smaller, you might end up seeing only one row of difference, or 3 rows. Plus, I think we _should_ already be handling this: https://github.com/microsoft/terminal/blob/d02812d699993a0cffdba828f1e6017326e4e6bb/src/cascadia/TerminalApp/AppLogic.cpp#L567-L598 I'd guess that since that code was written, something in the `TabRowControl` regressed. Maybe a MUX update changed how a `TabView` `Measure`s without any tabs in it. Can't say for sure. But I'd start by investigating why that code path is returning the wrong value.
Author
Owner

@DHowett commented on GitHub (Dec 15, 2020):

@zadjii-msft Backlogged. Yanked triage.

@DHowett commented on GitHub (Dec 15, 2020): @zadjii-msft Backlogged. Yanked triage.
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

:tada:This issue was addressed in #8584, which has now been successfully released as Windows Terminal v1.5.10271.0.🎉

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8584, which has now been successfully released as `Windows Terminal v1.5.10271.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.5.10271.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@ghost commented on GitHub (Jan 28, 2021):

:tada:This issue was addressed in #8584, which has now been successfully released as Windows Terminal Preview v1.6.10272.0.🎉

Handy links:

@ghost commented on GitHub (Jan 28, 2021): :tada:This issue was addressed in #8584, which has now been successfully released as `Windows Terminal Preview v1.6.10272.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.6.10272.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Author
Owner

@angelog0 commented on GitHub (Jan 31, 2021):

This issue was addressed in #8584, which has now been successfully released as Windows Terminal v1.5.10271.0

I am afraid but WT 1.5.10271.0 has the same issue: only when WT starts without tabs row has 30 lines; with tabs row it has 28 lines.

Maybe you meant the preview 1.6 has fixed this issue.. I do not use that...

@angelog0 commented on GitHub (Jan 31, 2021): > This issue was addressed in #8584, which has now been successfully released as Windows Terminal v1.5.10271.0 I am afraid but WT 1.5.10271.0 has the same issue: only when WT starts without tabs row has 30 lines; with tabs row it has 28 lines. Maybe you meant the preview 1.6 has fixed this issue.. I do not use that...
Author
Owner

@angelog0 commented on GitHub (Jan 31, 2021):

Attached some example

@angelog0 commented on GitHub (Jan 31, 2021): Attached some [example](https://github.com/microsoft/terminal/files/5900181/line_examples.tar.gz)
Author
Owner

@zadjii-msft commented on GitHub (Feb 1, 2021):

I'm guessing that this is only fixed in 1.6 Preview. I'm not sure which changes @DHowett brought down to 1.5, but this was definitely fixed in the 1.6 timeframe...

@zadjii-msft commented on GitHub (Feb 1, 2021): I'm guessing that this is only fixed in 1.6 Preview. I'm not sure which changes @DHowett brought down to 1.5, but this was definitely fixed in the 1.6 timeframe...
Author
Owner

@DHowett commented on GitHub (Feb 3, 2021):

No, 9e9c0bea8 is in the release-1.5 branch. That was the fix for this issue. I'm guessing that you'd be seeing this in 1.6 if you were using it.

@DHowett commented on GitHub (Feb 3, 2021): No, 9e9c0bea8 is in the release-1.5 branch. That was the fix for this issue. I'm guessing that you'd be seeing this in 1.6 if you were using it.
Author
Owner

@angelog0 commented on GitHub (Feb 3, 2021):

No, 9e9c0be is in the release-1.5 branch. That was the fix for this issue. I'm guessing that you'd be seeing this in 1.6 if you were using it.

Then the issue is not fixed, as my screenshots proof... (I don't use preview)

@angelog0 commented on GitHub (Feb 3, 2021): > No, 9e9c0be is in the release-1.5 branch. That was the fix for this issue. I'm guessing that you'd be seeing this in 1.6 if you were using it. Then the issue is not fixed, as my screenshots proof... (I don't use preview)
Author
Owner

@angelog0 commented on GitHub (Feb 3, 2021):

No, 9e9c0be is in the release-1.5 branch.

If I understood that code, it is not the fix for the issue I flagged here...

The issue I flagged here would need to resize the window height when tabs are visible to conserve the same initial rows...

@angelog0 commented on GitHub (Feb 3, 2021): > No, 9e9c0be is in the release-1.5 branch. If I understood that code, it is not the fix for the issue I flagged here... The issue I flagged here would need to resize the window height when tabs are visible to conserve the same initial rows...
Author
Owner

@DHowett commented on GitHub (Mar 30, 2021):

I don't know if we ever drove this to ground, so I'm reopening it.

@DHowett commented on GitHub (Mar 30, 2021): I don't know if we ever drove this to ground, so I'm reopening it.
Author
Owner

@angelog0 commented on GitHub (Apr 1, 2021):

Not, at least in v. 1.6.10571.0...

@angelog0 commented on GitHub (Apr 1, 2021): Not, at least in v. 1.6.10571.0...
Author
Owner

@zadjii-msft commented on GitHub (Feb 7, 2022):

idly: I wonder if the scrollbar size change is gonna Mess this up even more, if scrollbars are no longer SM_CXVSCROLL

@zadjii-msft commented on GitHub (Feb 7, 2022): idly: I wonder if the scrollbar size change is gonna Mess this up even more, if scrollbars are no longer `SM_CXVSCROLL`
Author
Owner

@yjlin0224 commented on GitHub (Jun 19, 2023):

This issue still happened in version 1.17.11461.0

https://github.com/microsoft/terminal/assets/11353779/1e0e7868-88fd-4268-936b-82b14b1ca743

Here is my settings:

{
    "$help": "https://aka.ms/terminal-documentation",
    "$schema": "https://aka.ms/terminal-profiles-schema",
    "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
    "windowingBehavior": "useExisting",
    "initialCols": 120,
    "initialRows": 40,
    "centerOnLaunch": true,
    "disabledProfileSources": [
        "Windows.Terminal.Azure"
    ],
    "copyFormatting": "all",
    "largePasteWarning": false,
    "multiLinePasteWarning": false,
    "theme": "Mica",
    "themes": [
        {
            "name": "Mica",
            "window": {
                "applicationTheme": "system",
                "useMica": true
            },
            "tab": {
                "background": "#00000040",
                "unfocusedBackground": "#00000000"
            },
            "tabRow": {
                "background": "#00000000",
                "unfocusedBackground": "#00000000"
            }
        }
    ],
    "schemes": [
        {
            "name": "VSCode Dark+",
            "foreground": "#cccccc",
            "background": "#252526",
            "selectionBackground": "#264f78",
            "cursorColor": "#cccccc",
            "black": "#000000",
            "red": "#cd3131",
            "green": "#0dbc79",
            "yellow": "#e5e510",
            "blue": "#2472c8",
            "purple": "#bc3fbc",
            "cyan": "#11a8cd",
            "white": "#e5e5e5",
            "brightBlack": "#666666",
            "brightRed": "#f14c4c",
            "brightGreen": "#23d18b",
            "brightYellow": "#f5f543",
            "brightBlue": "#3b8eea",
            "brightPurple": "#d670d6",
            "brightCyan": "#29b8db",
            "brightWhite": "#e5e5e5"
        },
        {
            "name": "VSCode Light+",
            "foreground": "#333333",
            "background": "#f3f3f3",
            "selectionBackground": "#add6ff",
            "cursorColor": "#333333",
            "black": "#000000",
            "red": "#cd3131",
            "green": "#00bc00",
            "yellow": "#949800",
            "blue": "#0451a5",
            "purple": "#bc05bc",
            "cyan": "#0598bc",
            "white": "#555555",
            "brightBlack": "#666666",
            "brightRed": "#cd3131",
            "brightGreen": "#14ce14",
            "brightYellow": "#b5ba00",
            "brightBlue": "#0451a5",
            "brightPurple": "#bc05bc",
            "brightCyan": "#0598bc",
            "brightWhite": "#a5a5a5"
        }
    ],
    "profiles": {
        "defaults": {
            "colorScheme": "VSCode Dark+",
            "font": {
                "face": "Sarasa Term TC",
                "size": 10,
                "features": {
                    "cv10": 6,
                    "cv31": 16,
                    "cv35": 6,
                    "cv42": 10,
                    "cv44": 2,
                    "cv49": 2,
                    "cv72": 3,
                    "cv77": 2,
                    "cv80": 2,
                    "cv82": 6,
                    "cv88": 2,
                    "cv93": 3
                }
            },
            "cursorShape": "bar",
            "opacity": 25,
            "padding": "6, 6, 6, 6",
            "background": "#000000",
            "unfocusedAppearance": {
                "background": "#202020",
            },
            "antialiasingMode": "cleartype",
            "historySize": 32767,
            "bellStyle": [
                "window",
                "taskbar"
            ],
            "experimental.autoMarkPrompts": true,
            "experimental.showMarksOnScrollbar": true,
            "experimental.rightClickContextMenu": true,
        },
        "list": [
            {
                "name": "PowerShell",
                "commandline": "pwsh -NoLogo",
                "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
                "source": "Windows.Terminal.PowershellCore"
            },
            {
                "name": "Windows PowerShell",
                "hidden": true,
                "commandline": "powershell -NoLogo",
                "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}"
            },
            {
                "name": "Command Prompt",
                "commandline": "cmd /k %UserProfile%\\.cmdrc.bat",
                "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}"
            },
            {
                "name": "Git Bash",
                "commandline": "%ProgramFiles%\\Git\\bin\\bash.exe -il",
                "startingDirectory": "%UserProfile%",
                "icon": "%ProgramFiles%\\Git\\mingw64\\share\\git\\git-for-windows.ico",
                "guid": "{d15b228a-05d7-50d1-8472-f60aaba86efc}"
            },
            {
                "name": "WSL",
                "hidden": true,
                "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}",
                "source": "Windows.Terminal.Wsl"
            },
            {
                "name": "Ubuntu (WSL)",
                "commandline": "wsl -d Ubuntu",
                "startingDirectory": "~",
                "guid": "{51855cb2-8cce-5362-8f54-464b92b32386}",
                "source": "CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc"
            }
        ]
    }
}

I am using Windows 11 10.0.22621.1702, and a 4K monitor with 150% scaling.
Now I set "initialRows": 36, to temporary fix the issue.

@yjlin0224 commented on GitHub (Jun 19, 2023): This issue still happened in version 1.17.11461.0 https://github.com/microsoft/terminal/assets/11353779/1e0e7868-88fd-4268-936b-82b14b1ca743 Here is my settings: ```json { "$help": "https://aka.ms/terminal-documentation", "$schema": "https://aka.ms/terminal-profiles-schema", "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "windowingBehavior": "useExisting", "initialCols": 120, "initialRows": 40, "centerOnLaunch": true, "disabledProfileSources": [ "Windows.Terminal.Azure" ], "copyFormatting": "all", "largePasteWarning": false, "multiLinePasteWarning": false, "theme": "Mica", "themes": [ { "name": "Mica", "window": { "applicationTheme": "system", "useMica": true }, "tab": { "background": "#00000040", "unfocusedBackground": "#00000000" }, "tabRow": { "background": "#00000000", "unfocusedBackground": "#00000000" } } ], "schemes": [ { "name": "VSCode Dark+", "foreground": "#cccccc", "background": "#252526", "selectionBackground": "#264f78", "cursorColor": "#cccccc", "black": "#000000", "red": "#cd3131", "green": "#0dbc79", "yellow": "#e5e510", "blue": "#2472c8", "purple": "#bc3fbc", "cyan": "#11a8cd", "white": "#e5e5e5", "brightBlack": "#666666", "brightRed": "#f14c4c", "brightGreen": "#23d18b", "brightYellow": "#f5f543", "brightBlue": "#3b8eea", "brightPurple": "#d670d6", "brightCyan": "#29b8db", "brightWhite": "#e5e5e5" }, { "name": "VSCode Light+", "foreground": "#333333", "background": "#f3f3f3", "selectionBackground": "#add6ff", "cursorColor": "#333333", "black": "#000000", "red": "#cd3131", "green": "#00bc00", "yellow": "#949800", "blue": "#0451a5", "purple": "#bc05bc", "cyan": "#0598bc", "white": "#555555", "brightBlack": "#666666", "brightRed": "#cd3131", "brightGreen": "#14ce14", "brightYellow": "#b5ba00", "brightBlue": "#0451a5", "brightPurple": "#bc05bc", "brightCyan": "#0598bc", "brightWhite": "#a5a5a5" } ], "profiles": { "defaults": { "colorScheme": "VSCode Dark+", "font": { "face": "Sarasa Term TC", "size": 10, "features": { "cv10": 6, "cv31": 16, "cv35": 6, "cv42": 10, "cv44": 2, "cv49": 2, "cv72": 3, "cv77": 2, "cv80": 2, "cv82": 6, "cv88": 2, "cv93": 3 } }, "cursorShape": "bar", "opacity": 25, "padding": "6, 6, 6, 6", "background": "#000000", "unfocusedAppearance": { "background": "#202020", }, "antialiasingMode": "cleartype", "historySize": 32767, "bellStyle": [ "window", "taskbar" ], "experimental.autoMarkPrompts": true, "experimental.showMarksOnScrollbar": true, "experimental.rightClickContextMenu": true, }, "list": [ { "name": "PowerShell", "commandline": "pwsh -NoLogo", "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "source": "Windows.Terminal.PowershellCore" }, { "name": "Windows PowerShell", "hidden": true, "commandline": "powershell -NoLogo", "guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}" }, { "name": "Command Prompt", "commandline": "cmd /k %UserProfile%\\.cmdrc.bat", "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}" }, { "name": "Git Bash", "commandline": "%ProgramFiles%\\Git\\bin\\bash.exe -il", "startingDirectory": "%UserProfile%", "icon": "%ProgramFiles%\\Git\\mingw64\\share\\git\\git-for-windows.ico", "guid": "{d15b228a-05d7-50d1-8472-f60aaba86efc}" }, { "name": "WSL", "hidden": true, "guid": "{2c4de342-38b7-51cf-b940-2309a097f518}", "source": "Windows.Terminal.Wsl" }, { "name": "Ubuntu (WSL)", "commandline": "wsl -d Ubuntu", "startingDirectory": "~", "guid": "{51855cb2-8cce-5362-8f54-464b92b32386}", "source": "CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc" } ] } } ``` I am using Windows 11 10.0.22621.1702, and a 4K monitor with 150% scaling. Now I set `"initialRows": 36,` to temporary fix the issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11735