mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-25 14:44:28 +00:00
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:
parent
2c59293b69
commit
9d59aa038e
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue