Merge remote-tracking branch 'filebrowser/add-file-browser'
This commit is contained in:
commit
0cffc49cbb
1 changed files with 2 additions and 2 deletions
|
@ -303,11 +303,11 @@ pub fn file_browser(root: PathBuf, editor: &Editor) -> Result<FileBrowser, std::
|
|||
(root, directory_style),
|
||||
move |cx, (path, is_dir): &(PathBuf, bool), action| {
|
||||
if *is_dir {
|
||||
let owned_path = path.clone();
|
||||
let new_root = helix_stdx::path::normalize(path);
|
||||
let callback = Box::pin(async move {
|
||||
let call: Callback =
|
||||
Callback::EditorCompositor(Box::new(move |editor, compositor| {
|
||||
if let Ok(picker) = file_browser(owned_path, editor) {
|
||||
if let Ok(picker) = file_browser(new_root, editor) {
|
||||
compositor.push(Box::new(overlay::overlaid(picker)));
|
||||
}
|
||||
}));
|
||||
|
|
Loading…
Reference in a new issue