fix: fetch buffers after creating

This commit is contained in:
zaaarf 2024-01-31 23:57:21 +01:00
parent f7fcf8bd22
commit bc3df45726

View file

@ -77,6 +77,9 @@ impl Workspace {
// add to filetree
self.filetree.insert(path.to_string());
// fetch buffers
self.fetch_buffers().await?;
Ok(())
}
@ -110,7 +113,7 @@ impl Workspace {
}
/// get a snapshot of a buffer (meaning its contents as a flat string)
pub async fn snapshot(&mut self, path: &str) -> crate::Result<String> {
pub async fn snapshot(&self, path: &str) -> crate::Result<String> {
let mut buffer_client = self.services.buffer.clone();
let contents = buffer_client.snapshot(
tonic::Request::new(SnapshotRequest { path: path.to_string() })