Fix renames over language server for SSH remoting (#17897)
Release Notes: - ssh remoting: Fix rename over language server --------- Co-authored-by: Mikayla <mikayla@zed.dev> Co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
01bb10f518
commit
e66ea9e5d4
34 changed files with 505 additions and 329 deletions
|
@ -15,7 +15,7 @@ use gpui::{
|
|||
use http_client::Url;
|
||||
use language::{
|
||||
proto::{deserialize_line_ending, deserialize_version, serialize_version, split_operations},
|
||||
Buffer, Capability, Event as BufferEvent, File as _, Language, Operation,
|
||||
Buffer, BufferEvent, Capability, File as _, Language, Operation,
|
||||
};
|
||||
use rpc::{proto, AnyProtoClient, ErrorExt as _, TypedEnvelope};
|
||||
use smol::channel::Receiver;
|
||||
|
@ -62,7 +62,7 @@ pub enum BufferStoreEvent {
|
|||
},
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
#[derive(Default, Debug)]
|
||||
pub struct ProjectTransaction(pub HashMap<Model<Buffer>, language::Transaction>);
|
||||
|
||||
impl EventEmitter<BufferStoreEvent> for BufferStore {}
|
||||
|
@ -1054,7 +1054,11 @@ impl BufferStore {
|
|||
buffer.update(cx, |buffer, cx| buffer.apply_ops(ops, cx))?;
|
||||
}
|
||||
OpenBuffer::Operations(operations) => operations.extend_from_slice(&ops),
|
||||
OpenBuffer::Weak(_) => {}
|
||||
OpenBuffer::Weak(buffer) => {
|
||||
if let Some(buffer) = buffer.upgrade() {
|
||||
buffer.update(cx, |buffer, cx| buffer.apply_ops(ops, cx))?;
|
||||
}
|
||||
}
|
||||
},
|
||||
hash_map::Entry::Vacant(e) => {
|
||||
e.insert(OpenBuffer::Operations(ops));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue