remove code

This commit is contained in:
Andrew Pareles 2024-11-18 21:02:18 -08:00
parent 67e9759d35
commit 4c633ee8ff
2 changed files with 1 additions and 15 deletions

View file

@ -1,5 +1,3 @@
import { Range } from 'vscode';
import { diffLines } from './react/out/util/diffLines.js'
export type BaseDiff = {
@ -16,18 +14,6 @@ export type BaseDiff = {
}
// Andrew diff algo:
export type SuggestedEdit = {
// start/end of current file
newRange: Range;
// start/end of original file
originalRange: Range;
type: 'insertion' | 'deletion' | 'edit';
originalContent: string; // original content (originalfile[originalStart...originalEnd])
newContent: string;
}
export function findDiffs(oldStr: string, newStr: string) {
// this makes it so the end of the file always ends with a \n (if you don't have this, then diffing E vs E\n gives an "edit". With it, you end up diffing E\n vs E\n\n which now properly gives an insertion)

View file

@ -414,7 +414,7 @@ class InlineDiffsService extends Disposable implements IInlineDiffsService {
const elt: IUndoRedoElement = {
type: UndoRedoElementType.Resource,
resource: model.uri,
label: 'Add Diffs',
label: 'Void Changes',
code: 'undoredo.inlineDiffs',
undo: () => { restoreDiffAreas(beforeSnapshot) },
redo: () => { if (afterSnapshot) restoreDiffAreas(afterSnapshot) }