diff --git a/helix-term/src/ui/explore.rs b/helix-term/src/ui/explore.rs index d4d3ae69..1f2d31bb 100644 --- a/helix-term/src/ui/explore.rs +++ b/helix-term/src/ui/explore.rs @@ -934,6 +934,11 @@ impl Component for Explorer { key!(']') => self.change_root(cx, self.tree.current_item().path.clone()), key!('d') => self.new_remove_prompt(cx), key!('r') => self.new_rename_prompt(), + shift!('R') => { + if let Err(error) = self.tree.refresh() { + cx.editor.set_error(error.to_string()) + } + } _ => { self.tree .handle_event(Event::Key(key_event), cx, &mut self.state); diff --git a/helix-term/src/ui/tree.rs b/helix-term/src/ui/tree.rs index d8e00741..b0e129f4 100644 --- a/helix-term/src/ui/tree.rs +++ b/helix-term/src/ui/tree.rs @@ -478,6 +478,10 @@ impl TreeView { Ok(()) } } + + pub fn refresh(&mut self) -> Result<()> { + self.tree.refresh() + } } impl TreeView {