Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r--helix-term/src/ui/editor.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 3626c5dd..0e51ec7e 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -1257,9 +1257,8 @@ impl EditorView {
let (view, doc) = current!(cxt.editor);
- let path = match doc.path() {
- Some(path) => path.clone(),
- None => return EventResult::Ignored(None),
+ let Some(path) = doc.path().map(ToOwned::to_owned) else {
+ return EventResult::Ignored(None);
};
if let Some(char_idx) =