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

Terminal decorations left behind after watch program (eg. tsc), cls, clear, etc. clears the terminal #166864

Open
roblourens opened this issue Nov 21, 2022 · 10 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug terminal-shell-integration Shell integration infrastructure, command decorations, etc.
Milestone

Comments

@roblourens
Copy link
Member

  • In vscode-jupyter run npm run compile (not a task)

Get this decoration left behind
image

@Tyriar
Copy link
Member

Tyriar commented Nov 21, 2022

Is this on Windows?

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Nov 21, 2022
@roblourens
Copy link
Member Author

mac

@Tyriar
Copy link
Member

Tyriar commented Nov 21, 2022

This may or may not be a bug depending on what tsc does exactly when not preserving watch output.

@Tyriar Tyriar added confirmation-pending terminal-shell-integration Shell integration infrastructure, command decorations, etc. and removed info-needed Issue requires more information from poster labels Nov 21, 2022
@Tyriar Tyriar added this to the Backlog milestone Nov 21, 2022
@ninmonkey
Copy link

ninmonkey commented Nov 24, 2022

Summarizing the important parts

Hints? Prompt locations are not in order

When it's broken, some jumps go out of order when hitting the ctrl+up/down keys. I had assumed it searched the text for the new prompt ansi escapes, so that is weird.

Test Error Occurs?
Pwsh Debug Term Yes
Normal Term Yes
settings.json .
terminal.integrated.persistentSessionReviveProcess never
terminal.integrated.allowChords true
terminal.integrated.sendKeybindingsToShell true
powershell.integratedConsole.forceClearScrollbackBuffer false
Additional Settings.Json (Click to Expand)
settings.json .
terminal.integrated.smoothScrolling True
powershell.integratedConsole.focusConsoleOnExecute True
powershell.integratedConsole.forceClearScrollbackBuffer False
powershell.integratedConsole.showOnStartup True
powershell.integratedConsole.useLegacyReadLine False
terminal.integrated.allowChords True
terminal.integrated.customGlyphs True
terminal.integrated.sendKeybindingsToShell True
terminal.integrated.shellIntegration.history 200
terminal.integrated.shellIntegration.decorationsEnabled both
terminal.integrated.defaultLocation editor
terminal.integrated.persistentSessionReviveProcess never
powershell.helpCompletion BlockComment

Summary

Terminal Integration icons lose their positioning after clearing screen. ctrl+l .
I have the default binding where the PSReadLine function is ClearScreen

image

Visuals

vscode ┐ PsIntegratedTerm ┐ jumping offsets - 2022-10e3

If you can see this horizontal gray bar (real tiny)

image

Watch it move on the bottom right corner of the gif

vscode ┐ PsIntegratedTerm ┐ jumping offsets - B - 2022-10e2

PowerShell Version

Name                           Value
----                           -----
PSVersion                      7.3.0
PSEdition                      Core
GitCommitId                    7.3.0
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visual Studio Code Version

1.73.1
6261075646f055b99068d3688932416f2346dd3b
x64

Extension Version

Steps to Reproduce

  • Open a fresh Powershell Extension terminal
  • Enter a few commands
  • Hit ctrl+l
  • scroll up and down

It seems to stay broken until you reload

@ninmonkey
Copy link

I believe we clear the decorations when certain erase in display sequences happen.

@Tyriar How do I can capture or log the actual ansi escapes sent to the terminal? I can't find it in default settings.json, but I thought I saw it in the patch notes?

I'm looking for that to test whether it's the actual buffer that's out of order -- or if it's at the visual level

Sorry about the long post. I tried to keep it short.

@meganrogge meganrogge added the tasks Task system issues label Nov 28, 2022
@Tyriar
Copy link
Member

Tyriar commented Nov 28, 2022

@ninmonkey you can run the toggle escape sequence command, checking that for what sequence is clearing is the first thing I'd do

@Tyriar Tyriar added the bug Issue identified by VS Code Team member as probable bug label Dec 5, 2022
@AffluentOwl
Copy link

So where exactly is this magical toggle escape sequences command?

@meganrogge
Copy link
Contributor

That has been removed. You can access that now by running Developer: set log level -> Terminal -> Debug and then open the terminal output channel.

@AffluentOwl
Copy link

For future readers who need as much handholding as me. Developer: set log level is a command that can be found by searching in the command palette (Ctrl + Shift + P) for >Developer: set log level. And the terminal output channel can be found in the Output tab (Ctrl + Shift + U) of the Panel area.

image

image

@Tyriar Tyriar changed the title Terminal decorations left behind Terminal decorations left behind after watch program like tsc clears the terminal Dec 10, 2024
@Tyriar Tyriar removed the tasks Task system issues label Dec 10, 2024
@Tyriar Tyriar changed the title Terminal decorations left behind after watch program like tsc clears the terminal Terminal decorations left behind after watch program (eg. tsc), cls, clear, etc. clears the terminal Dec 10, 2024
@Tyriar
Copy link
Member

Tyriar commented Dec 10, 2024

It's very possible this will be fixed when conpty v2 lands #224488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug terminal-shell-integration Shell integration infrastructure, command decorations, etc.
Projects
None yet
Development

No branches or pull requests

5 participants