Clear the current line when activating in terminal#1462
Clear the current line when activating in terminal#1462
Conversation
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.
1e91f4f to
2ab9f20
Compare
|
Ref #1375 |
|
Would be superseded by #962 but this consider the case for using the legacy activation |
|
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 |
|
Thanks for the PR :) I don't think we should do this, as clearing line is pretty aggressive compared to Big downside of clearing line is that user may be typing something but clearing before the explicit activation command would result in that typing experience "disappearing". Keyboard interrupt behavior is more expected as it shows what user was typing (or extension sending command) before the As far as shell integration, majority of our users are on it, and it's been the default ever since its introduction. In case auto-injection fails, we do provide way for manual installation here : https://code.visualstudio.com/docs/terminal/shell-integration#_manual-installation It's great that you called out #962 since we're planning roll shell startup as the default once env extension is fully rolled out. |
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: