WorkspaceEdit.entries() and get() are missing SnippetTextEdits
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
The following code adds three changes to a `WorkspaceEdit`, using a mix of `insert()` and `set()`:
```ts
const pos = new vs.Position(0, 0);
const range = new vs.Range(pos, pos);
const edit = new vs.WorkspaceEdit();
edit.insert(vs.Uri.parse("foo://foo"), pos, "ONE");
edit.set(vs.Uri.parse("foo://bar"), [[new vs.TextEdit(range, "TWO"), undefined]]);
edit.set(vs.Uri.parse("foo://baz"), [[new vs.SnippetTextEdit(range, new vs.SnippetString("THREE")), undefined]]);
for (const entry of edit.entries()) {
console.log(entry[0]);
}
```
When I loop over the entries and print them, only the first two changes are present:
The one that's missing is the `SnippetTextEdit`. So it appears there's no way to inspect a `WorkspaceEdit` and see all of the changes it will make, if it might include snippets.
Contributor guide
Assessment
This issue has not been assessed yet.