* Add a replace edit * * @param uri - The document URI * @param range - The range to replace * @param newText - The new text
(uri: { toString(): string }, range: IRange, newText: string)
| 181 | * @param newText - The new text |
| 182 | */ |
| 183 | replace(uri: { toString(): string }, range: IRange, newText: string): void { |
| 184 | const key = uri.toString() |
| 185 | if (!this._edits.has(key)) { |
| 186 | this._edits.set(key, []) |
| 187 | } |
| 188 | this._edits.get(key)!.push(TextEdit.replace(range, newText)) |
| 189 | } |
| 190 | |
| 191 | /** |
| 192 | * Get the number of documents with edits |