Skip to content

Commit a9f16bd

Browse files
Tidy up
1 parent b7fe33b commit a9f16bd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

crates/outline/src/outline.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,12 +305,12 @@ impl PickerDelegate for OutlineViewDelegate {
305305
let selected_index = if is_query_empty {
306306
let (buffer, cursor_offset) =
307307
this.delegate.active_editor.update(cx, |editor, cx| {
308-
let buffer = editor.buffer().read(cx).snapshot(cx);
308+
let snapshot = editor.display_snapshot(cx);
309309
let cursor_offset = editor
310310
.selections
311-
.newest::<MultiBufferOffset>(&editor.display_snapshot(cx))
311+
.newest::<MultiBufferOffset>(&snapshot)
312312
.head();
313-
(buffer, cursor_offset)
313+
(snapshot.buffer().clone(), cursor_offset)
314314
});
315315
this.delegate
316316
.matches

0 commit comments

Comments
 (0)