JanDeDobbeleer / oh-my-posh

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

Prompt changes using tab completion with PS-GuiCompletion #365

Closed thorstenkampe closed 3 years ago

thorstenkampe commented 3 years ago

Prerequisites

Description

Prompt changes using tab completion with PS-GuiCompletion or PowerTab

Environment

Steps to Reproduce

  1. Invoke tab completion with PS-GuiCompletion or PowerTab (for instance with cd <tab> image

  2. move cursor down (or any other key)

  3. PowerLine symbol inverts its colors image

Expected behavior: Prompt should not change

Actual behavior: Prompt changes

Config:

{
    "final_space": true,
    "blocks": [
        {
            "type": "prompt",
            "alignment": "left",
            "segments": [
                {
                    "type": "shell",
                    "style": "powerline",
                    "powerline_symbol": "",
                    "foreground": "lightWhite",
                    "background": "lightBlue"
                }
            ]
        }
    ]
}
JanDeDobbeleer commented 3 years ago

@thorstenkampe I'll see if I can reproduce this in other terminals. That said, this is going to be a bug in either ConEmu, PS-GuiCompletion or PowerTab as once rendered, there's nothing oh-my-posh can do that affects the visualisation. This is however an inverted ANSI sequence, and one of the tools is going to ruin the rendering when it draws that completion box.

thorstenkampe commented 3 years ago

I opened the issue here because the problem does not occur in my Starship prompt (although that might be coincedental).

JanDeDobbeleer commented 3 years ago

@thorstenkampe confirmed to be a bug with the toolset rather than oh-my-posh. It even changes the colours on the screen meaning their rendering influences the drawn ANSI characters. The default Install-Module progress bar also has this issue in Powershell meaning it could be something low level in the standard toolset. However, there's nothing I can do to resolve that, our string is drawn correctly and the tool(s) simply re-render that part and ruin it. So it's up to them to fix it.

This doesn't happen with every color and impacts background colours primarily. That's probably also why you don't see this on starship, when I use a prompt with only foreground colours, this doesn't happen.

github-actions[bot] commented 4 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.