joh/plastic fowl (#154275)

* * derive workspace dto with util
* be strict when defining reference version ids (must be set to a value or undefined)

* relax `ResourceNotebookCellEdit`
This commit is contained in:
Johannes Rieken
2022-07-06 18:33:04 +02:00
committed by GitHub
parent 0df86c37b6
commit f413297170
14 changed files with 159 additions and 147 deletions

View File

@@ -17,7 +17,7 @@ import { FindMatch, IModelDecorationOptions, IModelDeltaDecoration, TrackedRange
import { MultiModelEditStackElement, SingleModelEditStackElement } from 'vs/editor/common/model/editStack';
import { IntervalNode, IntervalTree } from 'vs/editor/common/model/intervalTree';
import { ModelDecorationOptions } from 'vs/editor/common/model/textModel';
import { WorkspaceTextEdit } from 'vs/editor/common/languages';
import { IWorkspaceTextEdit } from 'vs/editor/common/languages';
import { ITextModelService } from 'vs/editor/common/services/resolverService';
import { FoldingRegions } from 'vs/editor/contrib/folding/browser/foldingRanges';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
@@ -924,14 +924,15 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
return;
}
const textEdits: WorkspaceTextEdit[] = [];
const textEdits: IWorkspaceTextEdit[] = [];
this._lastNotebookEditResource.push(matches[0].cell.uri);
matches.forEach(match => {
match.matches.forEach((singleMatch, index) => {
if ((singleMatch as OutputFindMatch).index === undefined) {
textEdits.push({
edit: { range: (singleMatch as FindMatch).range, text: texts[index] },
versionId: undefined,
textEdit: { range: (singleMatch as FindMatch).range, text: texts[index] },
resource: match.cell.uri
});
}