fix(diff-editor)-performance

This commit is contained in:
chezsmithy 2025-05-08 16:42:05 -07:00
parent ec0180bf95
commit 4268438eac

View file

@ -127,6 +127,11 @@ export class VerticalDiffHandler implements vscode.Disposable {
private incrementCurrentLineIndex() {
this.currentLineIndex++;
this.updateIndexLineDecorations();
const range = new vscode.Range(this.currentLineIndex, 0, this.currentLineIndex, 0);
this.editor.revealRange(
range,
vscode.TextEditorRevealType.Default,
);
}
private async insertTextAboveLine(index: number, text: string) {
@ -338,6 +343,12 @@ export class VerticalDiffHandler implements vscode.Disposable {
await this.reapplyWithMyersDiff(diffLines);
const range = new vscode.Range(this.startLine, 0, this.startLine, 0);
this.editor.revealRange(
range,
vscode.TextEditorRevealType.Default,
);
this.options.onStatusUpdate(
"done",
this.editorToVerticalDiffCodeLens.get(this.fileUri)?.length ?? 0,