Skip to content

Clear the current line when activating in terminal#1462

Open
edvilme wants to merge 2 commits intomainfrom
terminal-activation-clear-line
Open

Clear the current line when activating in terminal#1462
edvilme wants to merge 2 commits intomainfrom
terminal-activation-clear-line

Conversation

@edvilme
Copy link
Copy Markdown
Contributor

@edvilme edvilme commented Apr 15, 2026

Ensures that the current terminal line is cleared before the command for activation is passed to the terminal. Before, it would interrupt user input, resulting in corrupted commands like: git pu\n, which not only produces the wrong command, but can lead to unsafe execution.

This occurs on the legacy (de)activation, due to users:

  • Having setting erminal.integrated.shellIntegration.enabled = false
  • Using a shell that does not support shell integration
  • Using slower machines, or remote SSH, and the shell integration timeout elapsing before the handshake.

Ensures that the current terminal line is cleared before the command for activation is passed to the terminal. Before, it would interrupt user input, resulting in corrupted commands like: git pu<activation command>\\n, which not only produces the wrong command, but can lead to unsafe execution.

This occurs on the legacy (de)activation, due to users:
- Having setting 	erminal.integrated.shellIntegration.enabled = false
- Using a shell that does not support shell integration
- Using slower machines, or remote SSH, and the shell integration timeout elapsing before the handshake.
@edvilme edvilme force-pushed the terminal-activation-clear-line branch from 1e91f4f to 2ab9f20 Compare April 15, 2026 20:05
@edvilme
Copy link
Copy Markdown
Contributor Author

edvilme commented Apr 15, 2026

Ref #1375

@edvilme
Copy link
Copy Markdown
Contributor Author

edvilme commented Apr 15, 2026

Would be superseded by #962 but this consider the case for using the legacy activation

@edvilme edvilme requested a review from eleanorjboyd April 15, 2026 20:10
@edvilme edvilme added the bug Issue identified by VS Code Team member as probable bug label Apr 15, 2026
@eleanorjboyd
Copy link
Copy Markdown
Member

going to defer this to @anthonykim1 to make a decision since this is his area of expertise. I am inclined to say we hold on this as we get the terminal experiments out and the stuff anthony has been working on since that should address the same problem

@edvilme edvilme requested a review from anthonykim1 April 15, 2026 22:32
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants