Include the desired version in a SaveBuffer RPC request

When handling this messages on the host, wait until the desired
version has been observed before performing the save.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-02-14 17:13:50 -08:00
parent 8d06049124
commit d358072c74
6 changed files with 35 additions and 12 deletions

View file

@ -1283,6 +1283,10 @@ impl Buffer {
self.text.wait_for_edits(edit_ids)
}
pub fn wait_for_version(&mut self, version: clock::Global) -> impl Future<Output = ()> {
self.text.wait_for_version(version)
}
pub fn set_active_selections(
&mut self,
selections: Arc<[Selection<Anchor>]>,