Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving Windows Terminal window between screens adds grey background to active line #211

Closed
2 tasks done
sobayed opened this issue Dec 2, 2020 · 6 comments
Closed
2 tasks done
Labels
🐛 bug Something isn't working powershell

Comments

@sobayed
Copy link

sobayed commented Dec 2, 2020

Prerequisites

  • I have read and understand the CONTRIBUTING guide
  • I looked for duplicate issues before submitting this one

Description

When I move the terminal window from my main screen (external monitor, 24 inch, 1920x1200, 100% scaling) to my laptop screen (14 inch, 1920x1080, 150% scaling) - or vice-versa - the active line is filled with a grey background (see screenshots).

oh-my-posh_3 47 3

This issue did not exist on my machine with oh-my-posh 3.30.0-beta:

oh-my-posh_3 30 0

Environment

  • Oh my Posh version: 3.47.3-beta
  • Theme: Paradox
  • Operating System: Windows 10 (Version 10.0.18363 Build 18363)
  • Shell: Powershell 7.10
  • Terminal: Windows Terminal 1.4.3243.0

Steps to Reproduce

  1. Start Windows Terminal with Powershell
  2. Move window from one screen to the other
  3. The active line is filled with a grey background

Expected behavior: The background colour of the active line is not changed (as with previous versions).

Actual behavior: The background colour of the active line changes to grey.

@JanDeDobbeleer JanDeDobbeleer added 🐛 bug Something isn't working powershell labels Dec 2, 2020
@JanDeDobbeleer
Copy link
Owner

I'm starting to dislike how Powershell handles the prompt function. Somehow when you think you fixed that absolutely weird error that only exists in Powershell, a new even more absurd error appears.

The thing is, there's nothing oh-my-posh does that runs on moving a window. It's probably due to the window re-rendering and screwing up ANSI escape chars (which is what's haunting Powershell since day 1).

That said, I'll try to find a fix!

@JanDeDobbeleer
Copy link
Owner

@sobayed this seems to be an issue with Windows Terminal rather than oh-my-posh. I can't reproduce this on my Mac with Powershell, which implies another factor is ruining the rendering of your terminal. Also, there doesn't seem to be any grey in your prompt, BUT we do clear the line (although that change isn't from after 3.30.0) which could somehow when moving the window remove your background color based on how Windows Terminal handles that.

@sobayed
Copy link
Author

sobayed commented Dec 2, 2020

Thanks for the update. The grey background also appears in the prompt (I just pressed return in the original screenshots to have the version in it).

Before typing anything:

oh-my-posh_3 47 3_before_typing

After starting to type:

oh-my-posh_3 47 3_after_typing

If you want me to run some additional tests, let me know.

@JanDeDobbeleer
Copy link
Owner

Maybe it's the clear to eol that ruines it. If my Windows machine still works I'll try to create a test binary.

@JanDeDobbeleer
Copy link
Owner

I can't reproduce this on my Windows machine. Then again, I don't have an external monitor here. Do you have the issue when moving to another virtual desktop as well?

@sobayed
Copy link
Author

sobayed commented Dec 3, 2020

I just updated to 3.48.0 and the issue seems to be gone in that version (at least I cannot reproduce it anymore on my machine). If it helps, I can run some additional tests with 3.47.3. Otherwise, I guess this issue can be closed.

Many thanks for the quick reponse, I really appreciate your work on this project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working powershell
Projects
None yet
Development

No branches or pull requests

2 participants