Merge pull request #5581 from chezsmithy/fix(diff-editor)-performance

fix(diff-editor)-performance
This commit is contained in:
Patrick Erichsen 2025-05-12 15:41:20 -07:00 • committed by GitHub
commit babcf33ecd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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,