project: Be explicit about project-searchability for buffers (#37773)

Closes https://github.com/zed-industries/zed/issues/28830

Release Notes:

- Fixed builtin buffers and log views showing up in project search
This commit is contained in:
Lukas Wirth
2025-09-08 11:22:36 +00:00
committed by GitHub
parent 01f5b73e3b
commit 80a4746a46
18 changed files with 71 additions and 53 deletions
+4 -3
View File
@@ -1167,7 +1167,7 @@ fn open_log_file(workspace: &mut Workspace, window: &mut Window, cx: &mut Contex
};
let project = workspace.project().clone();
let buffer = project.update(cx, |project, cx| {
project.create_local_buffer(&log, None, cx)
project.create_local_buffer(&log, None, false, cx)
});
let buffer = cx
@@ -1733,7 +1733,7 @@ fn open_telemetry_log_file(
workspace.update_in( cx, |workspace, window, cx| {
let project = workspace.project().clone();
let buffer = project.update(cx, |project, cx| project.create_local_buffer(&content, json, cx));
let buffer = project.update(cx, |project, cx| project.create_local_buffer(&content, json,false, cx));
let buffer = cx.new(|cx| {
MultiBuffer::singleton(buffer, cx).with_title("Telemetry Log".into())
});
@@ -1772,7 +1772,8 @@ fn open_bundled_file(
workspace.with_local_workspace(window, cx, |workspace, window, cx| {
let project = workspace.project();
let buffer = project.update(cx, move |project, cx| {
let buffer = project.create_local_buffer(text.as_ref(), language, cx);
let buffer =
project.create_local_buffer(text.as_ref(), language, false, cx);
buffer.update(cx, |buffer, cx| {
buffer.set_capability(Capability::ReadOnly, cx);
});