diff --git a/src/action.rs b/src/action.rs index 17b830b..8ee2083 100644 --- a/src/action.rs +++ b/src/action.rs @@ -322,7 +322,7 @@ impl RawEvent { } } - pub fn to_open_finder(&self, selection: Option) -> Option { + pub fn to_open_finder(&self, query: Option) -> Option { if matches!( &self.0, TerminalEvent::Key(KeyEvent { @@ -332,7 +332,7 @@ impl RawEvent { .. }) ) { - Some(Action::OpenFinder(selection)) + Some(Action::OpenFinder(query)) } else { None } diff --git a/src/ui/doc.rs b/src/ui/doc.rs index 7f73c3c..422e446 100644 --- a/src/ui/doc.rs +++ b/src/ui/doc.rs @@ -70,14 +70,10 @@ impl Element for Doc { .to_owned() .unwrap_or_else(|| std::env::current_dir().expect("no working dir")); - let selection = buffer.cursors[cursor_id] - .selection() - .map(|range| buffer.text.chars()[range].iter().copied().collect()); - match event.to_action(|e| { e.to_open_switcher() .or_else(|| e.to_open_opener(open_path)) - .or_else(|| e.to_open_finder(selection)) + .or_else(|| e.to_open_finder(None)) .or_else(|| e.to_move()) .or_else(|| e.to_save()) }) {