diff options
author | A-Walrus | 2022-11-21 01:58:35 +0000 |
---|---|---|
committer | GitHub | 2022-11-21 01:58:35 +0000 |
commit | 2f9ca3840a478fc58f411b6a4bc67019829ff72f (patch) | |
tree | e26e340d317442b4d9e8ae8216ad40dc297a77ca /helix-term/src/commands.rs | |
parent | 420e33a60064ad86e9f2f8dd29b3938318355673 (diff) |
Add preview for scratch buffers in buffer picker (#3454)
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r-- | helix-term/src/commands.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 1b0c557e..25f00f98 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2005,7 +2005,7 @@ fn global_search(cx: &mut Context) { align_view(doc, view, Align::Center); }, |_editor, FileResult { path, line_num }| { - Some((path.clone(), Some((*line_num, *line_num)))) + Some((path.clone().into(), Some((*line_num, *line_num)))) }, ); compositor.push(Box::new(overlayed(picker))); @@ -2360,7 +2360,7 @@ fn buffer_picker(cx: &mut Context) { .selection(view_id) .primary() .cursor_line(doc.text().slice(..)); - Some((meta.path.clone()?, Some((line, line)))) + Some((meta.id.into(), Some((line, line)))) }, ); cx.push_layer(Box::new(overlayed(picker))); @@ -2441,7 +2441,7 @@ fn jumplist_picker(cx: &mut Context) { |editor, meta| { let doc = &editor.documents.get(&meta.id)?; let line = meta.selection.primary().cursor_line(doc.text().slice(..)); - Some((meta.path.clone()?, Some((line, line)))) + Some((meta.path.clone()?.into(), Some((line, line)))) }, ); cx.push_layer(Box::new(overlayed(picker))); |