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

placeholder decoration is missing for cursor line on windows #151143

Closed
meganrogge opened this issue Jun 2, 2022 · 3 comments
Closed

placeholder decoration is missing for cursor line on windows #151143

meganrogge opened this issue Jun 2, 2022 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *out-of-scope Posted issue is not in scope of VS Code terminal-shell-integration Shell integration, command decorations, etc. terminal-shell-pwsh An issue in the terminal specific to PowerShell windows VS Code on Windows issues

Comments

@meganrogge
Copy link
Contributor

  1. create a terminal
  2. press enter repeatedly
  3. 🐛 the placeholder is always missing from the cursor line

windows

@meganrogge meganrogge added terminal-shell-integration Shell integration, command decorations, etc. bug Issue identified by VS Code Team member as probable bug labels Jun 2, 2022
@meganrogge meganrogge added this to the June 2022 milestone Jun 2, 2022
@Tyriar
Copy link
Member

Tyriar commented Jun 2, 2022

I wasn't sure where I mentioned this but I've been thinking of an idea to more aggressively check the contents of the line on Windows whenever a conpty reprint occurs to validate the command is in the right spot, similar to what is done on resize only right now. Not sure about perf implications

@Tyriar Tyriar added the windows VS Code on Windows issues label Jun 2, 2022
@Tyriar Tyriar added the terminal-shell-pwsh An issue in the terminal specific to PowerShell label Jun 22, 2022
@Tyriar
Copy link
Member

Tyriar commented Jun 23, 2022

This happens because conpty is printing the start sequences on the previous line:

[2022-06-23 08:00:17.341] [ptyhost] [debug] CommandDetectionCapability#handleCommandExecuted 34 undefined
[2022-06-23 08:00:17.341] [ptyhost] [debug] CommandDetectionCapability#setCommandLine 
[2022-06-23 08:00:17.341] [ptyhost] [debug] CommandDetectionCapability#handleCommandFinished 34 8  {"promptStartMarker":{"_disposables":[{},{},{},{}],"_isDisposed":false,"line":8,"_id":1,"isDisposed":false,"_onDispose":{"_listeners":[null],"_disposed":false}},"commandStartX":0,"commandStartMarker":{"_disposables":[{},{},{},{}],"_isDisposed":false,"line":8,"_id":2,"isDisposed":false,"_onDispose":{"_listeners":[null],"_disposed":false}},"commandStartLineContent":"PS C:\\Github\\lunapaint\\tga-codec>","commandExecutedX":34,"command":"","commandExecutedMarker":{"_disposables":[{},{},{},{}],"_isDisposed":false,"line":8,"_id":2,"isDisposed":false,"_onDispose":{"_listeners":[null],"_disposed":false}},"commandFinishedMarker":{"_disposables":[{},{},{},{}],"_isDisposed":false,"line":8,"_id":3,"isDisposed":false,"_onDispose":{"_listeners":[null],"_disposed":false}}}
[2022-06-23 08:00:17.341] [ptyhost] [debug] CommandDetectionCapability#onCommandFinished {"command":"","marker":{"_disposables":[{},{},{},{}],"_isDisposed":false,"line":8,"_id":2,"isDisposed":false,"_onDispose":{"_listeners":[null],"_disposed":false}},"endMarker":{"_disposables":[{},{},{},{}],"_isDisposed":false,"line":8,"_id":3,"isDisposed":false,"_onDispose":{"_listeners":[null],"_disposed":false}},"executedMarker":{"_disposables":[{},{},{},{}],"_isDisposed":false,"line":8,"_id":2,"isDisposed":false,"_onDispose":{"_listeners":[null],"_disposed":false}},"timestamp":1655996417341,"cwd":"C:\\Github\\lunapaint\\tga-codec","commandStartLineContent":"PS C:\\Github\\lunapaint\\tga-codec>","hasOutput":false}
[2022-06-23 08:00:17.342] [ptyhost] [debug] CommandDetectionCapability#handlePromptStart 34 8
[2022-06-23 08:00:17.356] [ptyhost] [debug] CommandDetectionCapability#_handleCommandStartWindows 34 8

@Tyriar
Copy link
Member

Tyriar commented Jun 24, 2022

This is one of those issues that isn't really possible to fix without messing with other heuristics, unless conpty positions the sequence correctly. The latter should happen soonish in microsoft/terminal#8698 and hopefully we'll be able to bundle a recent version of conpty instead of depending on the Windows release after that.

@Tyriar Tyriar closed this as completed Jun 24, 2022
@Tyriar Tyriar added the *out-of-scope Posted issue is not in scope of VS Code label Jun 24, 2022
@rzhao271 rzhao271 removed this from the June 2022 milestone Jun 29, 2022
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 *out-of-scope Posted issue is not in scope of VS Code terminal-shell-integration Shell integration, command decorations, etc. terminal-shell-pwsh An issue in the terminal specific to PowerShell windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests

3 participants