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:
1 parent
2c59293b69
commit
9d59aa038e
1 file changed
+1
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user