mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
Merge pull request #194757 from microsoft/merogge/fix-issue
revert accidental changes
This commit is contained in:
+3
-4
@@ -29,9 +29,8 @@ import type { Terminal } from 'xterm';
|
||||
import { Position } from 'vs/editor/common/core/position';
|
||||
import { ICommandWithEditorLine, TerminalAccessibleBufferProvider } from 'vs/workbench/contrib/terminalContrib/accessibility/browser/terminalAccessibleBufferProvider';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
import { TerminalSettingId, WindowsShellType } from 'vs/platform/terminal/common/terminal';
|
||||
import { TerminalSettingId } from 'vs/platform/terminal/common/terminal';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { isWindows } from 'vs/base/common/platform';
|
||||
|
||||
class TextAreaSyncContribution extends DisposableStore implements ITerminalContribution {
|
||||
static readonly ID = 'terminal.textAreaSync';
|
||||
@@ -47,7 +46,7 @@ class TextAreaSyncContribution extends DisposableStore implements ITerminalContr
|
||||
super();
|
||||
}
|
||||
xtermReady(xterm: IXtermTerminal & { raw: Terminal }): void {
|
||||
const addon = this._instantiationService.createInstance(TextAreaSyncAddon, isWindows ? this._instance.shellType as WindowsShellType : undefined, this._instance.capabilities);
|
||||
const addon = this._instantiationService.createInstance(TextAreaSyncAddon, this._instance.capabilities);
|
||||
xterm.raw.loadAddon(addon);
|
||||
addon.activate(xterm.raw);
|
||||
}
|
||||
@@ -90,7 +89,7 @@ export class TerminalAccessibleViewContribution extends Disposable implements IT
|
||||
}));
|
||||
}
|
||||
xtermReady(xterm: IXtermTerminal & { raw: Terminal }): void {
|
||||
const addon = this._instantiationService.createInstance(TextAreaSyncAddon, isWindows ? this._instance.shellType as WindowsShellType : undefined, this._instance.capabilities);
|
||||
const addon = this._instantiationService.createInstance(TextAreaSyncAddon, this._instance.capabilities);
|
||||
xterm.raw.loadAddon(addon);
|
||||
addon.activate(xterm.raw);
|
||||
this._xterm = xterm;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { Disposable, DisposableStore, MutableDisposable } from 'vs/base/common/lifecycle';
|
||||
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
||||
import { ITerminalCapabilityStore, TerminalCapability } from 'vs/platform/terminal/common/capabilities/capabilities';
|
||||
import { ITerminalLogService, WindowsShellType } from 'vs/platform/terminal/common/terminal';
|
||||
import { ITerminalLogService } from 'vs/platform/terminal/common/terminal';
|
||||
import type { Terminal, ITerminalAddon } from 'xterm';
|
||||
import { debounce } from 'vs/base/common/decorators';
|
||||
import { addDisposableListener } from 'vs/base/browser/dom';
|
||||
@@ -30,7 +30,6 @@ export class TextAreaSyncAddon extends Disposable implements ITerminalAddon {
|
||||
}
|
||||
|
||||
constructor(
|
||||
private readonly _windowsShell: WindowsShellType | undefined,
|
||||
private readonly _capabilities: ITerminalCapabilityStore,
|
||||
@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,
|
||||
@ITerminalLogService private readonly _logService: ITerminalLogService
|
||||
@@ -88,7 +87,7 @@ export class TextAreaSyncAddon extends Disposable implements ITerminalAddon {
|
||||
}
|
||||
const commandCapability = this._capabilities.get(TerminalCapability.CommandDetection);
|
||||
const currentCommand = commandCapability?.currentCommand;
|
||||
if (!currentCommand || (this._windowsShell && (this._windowsShell === 'pwsh' && !currentCommand.command?.includes('PS')) || (this._windowsShell === 'cmd' && !currentCommand.command?.includes('C:')))) {
|
||||
if (!currentCommand) {
|
||||
this._logService.debug(`TextAreaSyncAddon#updateCommandAndCursor: no current command`);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user