-
Notifications
You must be signed in to change notification settings - Fork 296
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
Multi-line text allows parts of Line 2 to bleed into Line 4 (if line 4 length is shorter than line 2 length) #3447
Comments
Now that I see my screenshot, I noticed that most of the output is garbled/repeated... |
Are you pasting with mouse right click? Using |
I am indeed right clicking. - didn't know this was known for that long 😉 |
The given information is a little inconsistent. Can you confirm if this happens with both VSCode integrated console and pwsh.exe in Windows Terminal?
Can you please provide the step to enable |
Adoption of the transient prompt is not yet very widespread, so I have uploaded my own file for convenience ParagnosterPlus2.omp.zip I have repo'd in the following terminals:
The above environment was taken from the pwsh session in Windows Terminal My VsCode terminals "terminal.integrated.profiles.windows": {
"PowerShell 5": {
"path": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"args": [
"-noExit"
]
},
"PowerShell 7": {
"path": "pwsh.exe",
"args": [
"-noExit"
]
},
}, |
In my case I am using a multiline oh-my-posh prompt. The issue occurs as well when running some command that is spanning across multiple lines. Only the first line is cleaned up. oh-my-posh-line1> transient-prompt> az rest --uri /subscriptions/mysubscription/providers/Microsoft.Web/locations/westeurope/managedApis/sap?api-version=2016-06-01 I guess the transient writing only clears the first Second example:
Only |
@daxian-dbw I see you tagged this issue with the label "resolution-duplicate", but isn't the issue I am experiencing different? Should I create a new issue for my issue? |
@cveld The issue you described here is different from the original issue that @DEberhardt opened.
It looks oh-my-posh register its own handler for the key Enter: https://github.com/JanDeDobbeleer/oh-my-posh/blob/e45cd7ea17636a2d6c527eeda7d9b609c21c2851/src/shell/scripts/omp.ps1#L134-L159 I think you should open an issue in the oh-my-posh repo instead. |
@daxian-dbw I just had a good debug session on our end to see what could cause the issue but without success. Yes, we register a handler for the All we want to do is display a different, more compact prompt on enter. This keeps the historical view in the terminal nice and clean, as you don't necessarily care about the previous state of your folder etc going forward. Therefore we make use of Provided this is what PSReadLine needs, it is solely responsible to reload the prompt correctly and display the current command and next prompt without issues (on Unless you can point to what we should not or be doing differently in our handler, this is a bug for PSReadLine. |
This seems to be the same root cause: |
Prerequisites
Exception report
Screenshot
Environment data
Steps to reproduce
Select multi-line text, like this one:
Paste it into a session that has Oh-my-posh loaded with TransientPrompt enabled, the output is this:
Expected behavior
Output displayed as-is
Actual behavior
On line 4, the text "de is off." is repeated from line 2. I could observe this on other terminals (Windows Terminal) with multi-line text as well.
This has no impact on the execution, but is a visual bug on the terminal.
The text was updated successfully, but these errors were encountered: