Use new multibuffer excerpts in find-all-references and friends (#27876)

Release Notes:

- N/A

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
This commit is contained in:
Conrad Irwin 2025-04-01 15:42:32 -06:00 committed by GitHub
parent e7290df02b
commit 9bc4697a33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 54 additions and 139 deletions

View file

@ -44,8 +44,8 @@ struct CommitMetadataFile {
worktree_id: WorktreeId,
}
const COMMIT_METADATA_NAMESPACE: &'static str = "0";
const FILE_NAMESPACE: &'static str = "1";
const COMMIT_METADATA_NAMESPACE: u32 = 0;
const FILE_NAMESPACE: u32 = 1;
impl CommitView {
pub fn open(

View file

@ -61,9 +61,9 @@ struct DiffBuffer {
file_status: FileStatus,
}
const CONFLICT_NAMESPACE: &'static str = "0";
const TRACKED_NAMESPACE: &'static str = "1";
const NEW_NAMESPACE: &'static str = "2";
const CONFLICT_NAMESPACE: u32 = 0;
const TRACKED_NAMESPACE: u32 = 1;
const NEW_NAMESPACE: u32 = 2;
impl ProjectDiff {
pub(crate) fn register(workspace: &mut Workspace, cx: &mut Context<Workspace>) {
@ -404,7 +404,7 @@ impl ProjectDiff {
let (was_empty, is_excerpt_newly_added) = self.multibuffer.update(cx, |multibuffer, cx| {
let was_empty = multibuffer.is_empty();
let is_newly_added = multibuffer.set_excerpts_for_path(
let (_, is_newly_added) = multibuffer.set_excerpts_for_path(
path_key.clone(),
buffer,
diff_hunk_ranges,