Johannes Rieken
2023-12-19 17:55:40 +01:00
committed by GitHub
parent 48996f7724
commit 595e7d4275
3 changed files with 3 additions and 24 deletions

View File

@@ -75,8 +75,6 @@ export abstract class EditModeStrategy {
abstract renderChanges(response: ReplyResponse): Promise<Position | undefined>;
abstract hasFocus(): boolean;
abstract needsMargin(): boolean;
}
export class PreviewStrategy extends EditModeStrategy {
@@ -165,10 +163,6 @@ export class PreviewStrategy extends EditModeStrategy {
hasFocus(): boolean {
return this._zone.widget.hasFocus();
}
needsMargin(): boolean {
return true;
}
}
@@ -307,11 +301,6 @@ export class LivePreviewStrategy extends EditModeStrategy {
this._zone.widget.updateStatus(message);
}
override needsMargin(): boolean {
return true;
}
private async _updateDiffZones() {
const diff = await this._editorWorkerService.computeDiff(this._session.textModel0.uri, this._session.textModelN.uri, { ignoreTrimWhitespace: false, maxComputationTimeMs: 5000, computeMoves: false }, 'advanced');
if (!diff || diff.changes.length === 0) {
@@ -901,10 +890,6 @@ export class LiveStrategy extends EditModeStrategy {
this._zone.widget.updateStatus(message);
}
override needsMargin(): boolean {
return true;
}
hasFocus(): boolean {
return this._zone.widget.hasFocus();
}