mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
remove code
This commit is contained in:
parent
67e9759d35
commit
4c633ee8ff
2 changed files with 1 additions and 15 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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) }
|
||||
|
|
|
|||
Loading…
Reference in a new issue