Unnamed repository; edit this file 'description' to name the repository.
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 eaf5d33f..20f6dd3f 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2640,7 +2640,7 @@ fn global_search(cx: &mut Context) { let documents: Vec<_> = editor .documents() - .map(|doc| (doc.path().cloned(), doc.text().to_owned())) + .map(|doc| (doc.path().map(ToOwned::to_owned), doc.text().to_owned())) .collect(); let matcher = match RegexMatcherBuilder::new() @@ -3300,7 +3300,7 @@ fn buffer_picker(cx: &mut Context) { let new_meta = |doc: &Document| BufferMeta { id: doc.id(), - path: doc.path().cloned(), + path: doc.path().map(ToOwned::to_owned), is_modified: doc.is_modified(), is_current: doc.id() == current, focused_at: doc.focused_at, @@ -3397,7 +3397,7 @@ fn jumplist_picker(cx: &mut Context) { JumpMeta { id: doc_id, - path: doc.and_then(|d| d.path().cloned()), + path: doc.and_then(|doc| doc.path().map(ToOwned::to_owned)), selection, text, is_current: view.doc == doc_id, |