mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-25 16:34:48 +01:00
fix: fetch buffers after creating
This commit is contained in:
parent
f7fcf8bd22
commit
bc3df45726
1 changed files with 5 additions and 2 deletions
|
@ -74,9 +74,12 @@ impl Workspace {
|
|||
tonic::Request::new(BufferPayload { path: path.to_string() })
|
||||
).await?;
|
||||
|
||||
//add to filetree
|
||||
// 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() })
|
||||
|
|
Loading…
Reference in a new issue