Skip to content

Commit 10355fa

Browse files
committed
Fixed content tracking version mismatch warning
1 parent 556b426 commit 10355fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: handler/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ func (handler *InoHandler) didChange(ctx context.Context, req *lsp.DidChangeText
432432
if !ok {
433433
return nil, unknownURI(doc.URI)
434434
}
435-
if trackedDoc.Version+1 != doc.Version {
435+
if trackedDoc.Version+len(req.ContentChanges) != doc.Version {
436436
return nil, errors.Errorf("document out-of-sync: expected version %d but got %d", trackedDoc.Version+1, doc.Version)
437437
}
438438
for _, change := range req.ContentChanges {

0 commit comments

Comments
 (0)