mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-31 12:16:22 +01:00
improve name
This commit is contained in:
@@ -16,8 +16,8 @@ export interface ITextAreaData {
|
||||
|
||||
export class TextAreaSyncAddon extends Disposable implements ITerminalAddon {
|
||||
private _terminal: Terminal | undefined;
|
||||
private readonly _onDidRequestUpdateTextArea = this._register(new Emitter<ITextAreaData>());
|
||||
readonly onDidRequestUpdateTextArea = this._onDidRequestUpdateTextArea.event;
|
||||
private readonly _onDidRequestTextAreaSync = this._register(new Emitter<ITextAreaData>());
|
||||
readonly onDidRequestTextAreaSync = this._onDidRequestTextAreaSync.event;
|
||||
activate(terminal: Terminal): void {
|
||||
this._terminal = terminal;
|
||||
this._register(this._terminal.onCursorMove(() => this._refreshTextArea()));
|
||||
@@ -57,7 +57,7 @@ export class TextAreaSyncAddon extends Disposable implements ITerminalAddon {
|
||||
commandStartX = 0;
|
||||
}
|
||||
if (commandStartX) {
|
||||
this._onDidRequestUpdateTextArea.fire({ content, cursorX: buffer.cursorX - commandStartX });
|
||||
this._onDidRequestTextAreaSync.fire({ content, cursorX: buffer.cursorX - commandStartX });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ export class XtermTerminal extends DisposableStore implements IXtermTerminal, ID
|
||||
this.raw.loadAddon(this._shellIntegrationAddon);
|
||||
this._textAreaSyncAddon = this._instantiationService.createInstance(TextAreaSyncAddon, this._capabilities);
|
||||
this.raw.loadAddon(this._textAreaSyncAddon);
|
||||
this.add(this._textAreaSyncAddon.onDidRequestUpdateTextArea((data) => {
|
||||
this.add(this._textAreaSyncAddon.onDidRequestTextAreaSync((data) => {
|
||||
const textArea = this.raw.textarea;
|
||||
if (!textArea) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user