Skip to content

Commit 93b57d1

Browse files
committed
fix(document): synchronize before applyEdits on vim
Closes #5411
1 parent b0a699d commit 93b57d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/model/document.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ export default class Document {
294294
public async applyEdits(edits: TextEdit[], joinUndo = false, move: boolean | Position = false): Promise<TextEdit | undefined> {
295295
if (Array.isArray(arguments[1])) edits = arguments[1]
296296
if (!this._attached || edits.length === 0) return
297+
if (isVim && this._applying) {
298+
await this.synchronize()
299+
}
297300
const { bufnr } = this
298301
this._forceSync()
299302
let textDocument = this.textDocument

0 commit comments

Comments
 (0)