mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
fix bug with inserting code block into terminal (#284132)
fixes #275345
This commit is contained in:
@@ -960,10 +960,9 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
|
|||||||
await this._processManager.setNextCommandId(commandLine, commandId);
|
await this._processManager.setNextCommandId(commandLine, commandId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Determine whether to send ETX (ctrl+c) before running the command. This should always
|
// Determine whether to send ETX (ctrl+c) before running the command. Only do this when the
|
||||||
// happen unless command detection can reliably say that a command is being entered and
|
// command will be executed immediately or when command detection shows the prompt contains text.
|
||||||
// there is no content in the prompt
|
if (shouldExecute && (!commandDetection || commandDetection.promptInputModel.value.length > 0)) {
|
||||||
if (!commandDetection || commandDetection.promptInputModel.value.length > 0) {
|
|
||||||
await this.sendText('\x03', false);
|
await this.sendText('\x03', false);
|
||||||
// Wait a little before running the command to avoid the sequences being echoed while the ^C
|
// Wait a little before running the command to avoid the sequences being echoed while the ^C
|
||||||
// is being evaluated
|
// is being evaluated
|
||||||
|
|||||||
Reference in New Issue
Block a user