Skip to content

Commit 6ca26d9

Browse files
committed
different udf check
1 parent 68a8e14 commit 6ca26d9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/vs/workbench/contrib/terminalContrib/accessibility/browser/textAreaSyncAddon.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { ITerminalLogService } from 'vs/platform/terminal/common/terminal';
1010
import type { Terminal, ITerminalAddon } from 'xterm';
1111
import { debounce } from 'vs/base/common/decorators';
1212
import { addDisposableListener } from 'vs/base/browser/dom';
13-
import { isMacintosh } from 'vs/base/common/platform';
1413

1514
export interface ITextAreaData {
1615
content: string;
@@ -101,10 +100,9 @@ export class TextAreaSyncAddon extends Disposable implements ITerminalAddon {
101100
this._logService.debug(`TextAreaSyncAddon#updateCommandAndCursor: no line`);
102101
return;
103102
}
104-
const startX = isMacintosh || currentCommand.commandStartX !== undefined ? currentCommand.commandStartX : 0;
105-
if (!!currentCommand && startX !== undefined) {
106-
this._currentCommand = commandLine.substring(startX);
107-
this._cursorX = buffer.cursorX - startX;
103+
if (currentCommand?.commandStartX !== undefined) {
104+
this._currentCommand = commandLine.substring(currentCommand.commandStartX);
105+
this._cursorX = buffer.cursorX - currentCommand.commandStartX;
108106
} else {
109107
this._currentCommand = undefined;
110108
this._cursorX = undefined;

0 commit comments

Comments
 (0)