diff --git a/crates/editor/src/items.rs b/crates/editor/src/items.rs index d3c5089af2ea7e384565587b064e4ee49bb6a901..bbb8943145b08c25584f2b45ac132383638a4998 100644 --- a/crates/editor/src/items.rs +++ b/crates/editor/src/items.rs @@ -618,11 +618,8 @@ impl Item for Editor { ItemSettings::get_global(cx) .file_icons .then(|| { - self.buffer - .read(cx) - .as_singleton() - .and_then(|buffer| buffer.read(cx).project_path(cx)) - .and_then(|path| FileIcons::get_icon(path.path.as_ref(), cx)) + path_for_buffer(&self.buffer, 0, true, cx) + .and_then(|path| FileIcons::get_icon(path.as_ref(), cx)) }) .flatten() .map(Icon::from_path)