Change summary
crates/editor/src/items.rs | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
Detailed changes
@@ -55,11 +55,9 @@ impl FollowableItem for Editor {
let buffer = buffer.await?;
let editor = pane
.read_with(&cx, |pane, cx| {
- let existing = pane.items_of_type::<Self>().find(|editor| {
+ pane.items_of_type::<Self>().find(|editor| {
editor.read(cx).buffer.read(cx).as_singleton().as_ref() == Some(&buffer)
- });
- dbg!(&existing);
- existing
+ })
})
.unwrap_or_else(|| {
pane.update(&mut cx, |_, cx| {