Skip to content

Commit

Permalink
Only pass conptyInheritCursor for tasks
Browse files Browse the repository at this point in the history
Part of #76548
  • Loading branch information
Tyriar committed Aug 8, 2019
1 parent f1b7e0f commit 8e286cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
Expand Up @@ -1130,6 +1130,12 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
}
}

// HACK: Force initialText to be non-falsy for reused terminals such that the
// conptyInheritCursor flag is passed to the node-pty, this flag can cause a Window to hang
// in Windows 10 1903 so we only want to use it when something is definitely written to the
// terminal.
shell.initialText = ' ';

// Set the new shell launch config
this._shellLaunchConfig = shell; // Must be done before calling _createProcess()

Expand Down
3 changes: 2 additions & 1 deletion src/vs/workbench/contrib/terminal/node/terminalProcess.ts
Expand Up @@ -66,7 +66,8 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess
cols,
rows,
experimentalUseConpty: useConpty,
conptyInheritCursor: true
// This option will force conpty to not redraw the whole viewport on launch
conptyInheritCursor: useConpty && !!shellLaunchConfig.initialText
};

const cwdVerification = stat(cwd).then(async stat => {
Expand Down

0 comments on commit 8e286cc

Please sign in to comment.