Add the ability to propose changes to a set of buffers (#18170)
This PR introduces functionality for creating *branches* of buffers that can be used to preview and edit change sets that haven't yet been applied to the buffers themselves. Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com> Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
parent
e309fbda2a
commit
743feb98bc
20 changed files with 622 additions and 186 deletions
|
@ -146,12 +146,15 @@ impl HeadlessProject {
|
|||
cx: &mut ModelContext<Self>,
|
||||
) {
|
||||
match event {
|
||||
BufferEvent::Operation(op) => cx
|
||||
BufferEvent::Operation {
|
||||
operation,
|
||||
is_local: true,
|
||||
} => cx
|
||||
.background_executor()
|
||||
.spawn(self.session.request(proto::UpdateBuffer {
|
||||
project_id: SSH_PROJECT_ID,
|
||||
buffer_id: buffer.read(cx).remote_id().to_proto(),
|
||||
operations: vec![serialize_operation(op)],
|
||||
operations: vec![serialize_operation(operation)],
|
||||
}))
|
||||
.detach(),
|
||||
_ => {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue