Skip to content

Commit a5fabc6

Browse files
committed
1 parent 6b49d15 commit a5fabc6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ export class TextAreaSyncAddon extends Disposable implements ITerminalAddon {
100100
this._logService.debug(`TextAreaSyncAddon#updateCommandAndCursor: no line`);
101101
return;
102102
}
103-
if (!!currentCommand.commandStartX) {
104-
this._currentCommand = commandLine.substring(currentCommand.commandStartX);
105-
this._cursorX = buffer.cursorX - currentCommand.commandStartX;
103+
if (!!currentCommand) {
104+
this._currentCommand = commandLine.substring(currentCommand.commandStartX ?? 0);
105+
this._cursorX = buffer.cursorX - (currentCommand.commandStartX ?? 0);
106106
} else {
107107
this._currentCommand = undefined;
108108
this._cursorX = undefined;

0 commit comments

Comments
 (0)