open new buffer (#11203)

Release Notes:

- Allow creating new untitled buffers in remote projects

TODO:
- Add a Test
- Fix version number check
This commit is contained in:
Conrad Irwin
2024-04-30 16:09:43 -06:00
committed by GitHub
parent 28bcc95468
commit 3752ed294d
19 changed files with 276 additions and 111 deletions
+18 -22
View File
@@ -108,10 +108,9 @@ mod tests {
let project = Project::test(fs, [], cx).await;
// buffer has two modified hunks with two rows each
let buffer_1 = project
.update(cx, |project, cx| {
project.create_buffer(
"
let buffer_1 = project.update(cx, |project, cx| {
project.create_local_buffer(
"
1.zero
1.ONE
1.TWO
@@ -120,13 +119,12 @@ mod tests {
1.FIVE
1.six
"
.unindent()
.as_str(),
None,
cx,
)
})
.unwrap();
.unindent()
.as_str(),
None,
cx,
)
});
buffer_1.update(cx, |buffer, cx| {
buffer.set_diff_base(
Some(
@@ -146,10 +144,9 @@ mod tests {
});
// buffer has a deletion hunk and an insertion hunk
let buffer_2 = project
.update(cx, |project, cx| {
project.create_buffer(
"
let buffer_2 = project.update(cx, |project, cx| {
project.create_local_buffer(
"
2.zero
2.one
2.two
@@ -158,13 +155,12 @@ mod tests {
2.five
2.six
"
.unindent()
.as_str(),
None,
cx,
)
})
.unwrap();
.unindent()
.as_str(),
None,
cx,
)
});
buffer_2.update(cx, |buffer, cx| {
buffer.set_diff_base(
Some(