如何防止Visual Studio代码终端删除字符后未显示正确的提示?
当通过SSH与Visual Studio代码连接并从终端提示输入中删除字符时,该字符通常处于不良状态。提示可能留下一些未呈现的剩余字符,或者呈现的字符,但实际上不在提示中,因此无法确定其当前状态。
如何修复?
When connecting through ssh with Visual Studio Code and deleting characters from the terminal prompt input, this one is usually left in a bad state. The prompt may be left with some remaining characters that are not rendered, or characters that are rendered but are not actually in the prompt, making it impossible to determine its current state.
How can this be fixed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案非常简单。在 file> perecences> settings 搜索
terminal.intinal.integrated.localecholatencythresthreshold
设置并将其设置为> -1
(或setterminal.terminal.intinal.intinal.integrated.integrated.integrated.integrated.integrated.integrated.integrated.integrated.integrated in .localechoenabled
tooff
)。这会禁用本地回声延迟(在未等待服务器确认的情况下,在终端上回动了本地编辑的延迟)。通过这样做,您可以确保本地终端提示始终具有与服务器提示符相同的状态。
在
The solution is very simple. Under File>Preferences>Settings search for
terminal.integrated.localEchoLatencyThreshold
setting and set it to-1
(or setterminal.integrated.localEchoEnabled
tooff
).This disables the local echo latency (delay in which local edits are echoed on the terminal without waiting for server acknowledgement). By doing so, you ensure that the local terminal prompt always has the same state as the server prompt.
Fix found on https://github.com/microsoft/vscode/issues/133885.