Ensure correct ordering of notifications

This commit is contained in:
Zachary Yedidia
2020-08-16 12:35:08 -04:00
parent 98b3ed0eec
commit 01f55a6c79
3 changed files with 13 additions and 8 deletions

View File

@@ -161,7 +161,7 @@ func (b *SharedBuffer) lspDidChange(start, end Loc, text string) {
}
if b.HasLSP() {
b.Server.DidChange(b.AbsPath, &b.version, []lspt.TextDocumentContentChangeEvent{change})
b.Server.DidChange(b.AbsPath, b.version, []lspt.TextDocumentContentChangeEvent{change})
}
}
@@ -428,7 +428,7 @@ func (b *Buffer) lspInit() {
if len(bytes) == 0 {
bytes = []byte{'\n'}
}
b.Server.DidOpen(b.AbsPath, ft, string(bytes), &b.version)
b.Server.DidOpen(b.AbsPath, ft, string(bytes), b.version)
}
}
}