svg_preview: Fix SVG preview opening duplicate tabs (#49250)

Release Notes:

- Fixed SVG preview always opening a new tab instead of reusing an
existing one for the same file.
This commit is contained in:
Smit Barmase authored and GitHub committed 2026-02-16 13:46:28 +05:30
1 parent 2c59293b69
commit 9d59aa038e
1 file changed
+1 -1
+1 -1
View File
@@ -141,7 +141,7 @@ impl SvgPreviewView {
buffer: &Entity<MultiBuffer>,
cx: &App,
) -> Option<usize> {
let buffer_id = buffer.entity_id();
let buffer_id = buffer.read(cx).as_singleton()?.entity_id();
pane.items_of_type::<SvgPreviewView>()
.find(|view| {
view.read(cx)