File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
src/vs/workbench/contrib/terminalContrib/accessibility/browser Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import { ITerminalLogService } from 'vs/platform/terminal/common/terminal';
10
10
import type { Terminal , ITerminalAddon } from 'xterm' ;
11
11
import { debounce } from 'vs/base/common/decorators' ;
12
12
import { addDisposableListener } from 'vs/base/browser/dom' ;
13
- import { isMacintosh } from 'vs/base/common/platform' ;
14
13
15
14
export interface ITextAreaData {
16
15
content : string ;
@@ -101,10 +100,9 @@ export class TextAreaSyncAddon extends Disposable implements ITerminalAddon {
101
100
this . _logService . debug ( `TextAreaSyncAddon#updateCommandAndCursor: no line` ) ;
102
101
return ;
103
102
}
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 ;
108
106
} else {
109
107
this . _currentCommand = undefined ;
110
108
this . _cursorX = undefined ;
You can’t perform that action at this time.
0 commit comments