JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.38k stars 2.39k forks source link

Prompt mangled on first display (correct after initial prompt) #1185

Closed RobThree closed 3 years ago

RobThree commented 3 years ago

Code of Conduct

What happened?

I'm sorry if I'm in the wrong place here but I don't know where to go else. If I need to go elsewhere, please tell me where.

My issue with the last few versions of (what i think is Oh My Posh) is that the very first prompt is 'mangled':

image

Whenever I hit enter and all subsequent times the prompt is shown it's shown correctly:

image

Whenever I open the terminal as administrator the prompt is fine too:

image

Version

6.1.0 but I experienced this issue with at least a number of the then-latest versions over the past months.

Theme

{
    "final_space": true,
    "console_title": true,
    "console_title_style": "folder",
    "blocks": [
        {
            "type": "prompt",
            "alignment": "left",
            "horizontal_offset": 0,
            "vertical_offset": 0,
            "segments": [
                {
                    "type": "path",
                    "style": "diamond",
                    "powerline_symbol": "",
                    "invert_powerline": false,
                    "foreground": "#ffffff",
                    "background": "#ff479c",
                    "leading_diamond": "",
                    "trailing_diamond": "",
                    "properties": {
                        "prefix": "  ",
                        "style": "folder"
                    }
                },
                {
                    "type": "git",
                    "style": "powerline",
                    "powerline_symbol": "",
                    "invert_powerline": false,
                    "foreground": "#193549",
                    "background": "#fffb38",
                    "leading_diamond": "",
                    "trailing_diamond": "",
                    "properties": {
                        "display_status": true,
                        "display_stash_count": true,
                        "display_upstream_icon": true
                    }
                },
                {
                    "type": "dotnet",
                    "style": "powerline",
                    "powerline_symbol": "",
                    "invert_powerline": false,
                    "foreground": "#ffffff",
                    "background": "#6CA35E",
                    "leading_diamond": "",
                    "trailing_diamond": "",
                    "properties": {
                        "display_version": true,
                        "prefix": "  "
                    }
                },
                {
                    "type": "root",
                    "style": "powerline",
                    "powerline_symbol": "",
                    "invert_powerline": false,
                    "foreground": "#ffffff",
                    "background": "#ffff66",
                    "leading_diamond": "",
                    "trailing_diamond": "",
                    "properties": null
                },
                {
                    "type": "exit",
                    "style": "powerline",
                    "powerline_symbol": "",
                    "invert_powerline": false,
                    "foreground": "#ffffff",
                    "background": "#2e9599",
                    "leading_diamond": "",
                    "trailing_diamond": "",
                    "properties": {
                        "always_enabled": true,
                        "color_background": true,
                        "display_exit_code": false,
                        "error_color": "#f1184c",
                        "prefix": " "
                    }
                }
            ]
        }
    ]
}

The font I'm using is "CaskaydiaCove NF".

What OS are you seeing the problem on?

Windows 10, and it stayed after I upgraded to Windows 11.

I'm also experiencing this on a second machine (which is Win 10 still).

Which shell are you using?

powershell

Relevant log output

No response

JanDeDobbeleer commented 3 years ago

@RobThree that’s a known Windows Terminal bug. You can find more information and a fix here.

github-actions[bot] commented 7 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.