diff options
author | Blaž Hrastnik | 2021-03-24 05:28:26 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-03-24 05:28:26 +0000 |
commit | 8a0ab447ecfa6c2c448603d469ba4fd06e95c754 (patch) | |
tree | 9bf78106dbc54d02f7938d287467da44feaffe9d /helix-term/src/ui | |
parent | b24cdd1295d1129dc730e02da2c6723938220d7e (diff) |
editor.open can now either replace the current view or open in a split.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index f91a9f35..a625aa14 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -101,7 +101,10 @@ pub fn file_picker(root: &str) -> Picker<PathBuf> { path.strip_prefix("./").unwrap().to_str().unwrap().into() }, move |editor: &mut Editor, path: &PathBuf| { - let document_id = editor.open(path.into()).expect("editor.open failed"); + use helix_view::editor::Action; + let document_id = editor + .open(path.into(), Action::Replace) + .expect("editor.open failed"); }, ) } |