summaryrefslogtreecommitdiffstats
path: root/src/event_exec.rs
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2023-03-29 23:26:35 +0200
committerqkzk <qu3nt1n@gmail.com>2023-03-29 23:26:35 +0200
commitf55d5e85d139ee455932f54403eb646dd614e5fa (patch)
tree3e6d88db8d4697fc363e52d6b61a4d78bb707c24 /src/event_exec.rs
parentdb6203086f5ac5654f3a4cd8f53ee88b8174213d (diff)
key ` goes to root
Diffstat (limited to 'src/event_exec.rs')
-rw-r--r--src/event_exec.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/event_exec.rs b/src/event_exec.rs
index 47609ed..d778362 100644
--- a/src/event_exec.rs
+++ b/src/event_exec.rs
@@ -950,9 +950,12 @@ impl EventExec {
let home_cow = shellexpand::tilde("~");
let home: &str = home_cow.borrow();
let path = std::fs::canonicalize(home)?;
- tab.set_pathcontent(&path)?;
+ tab.set_pathcontent(&path)
+ }
- Ok(())
+ pub fn event_go_root(tab: &mut Tab) -> Result<()> {
+ let root_path = std::path::PathBuf::from("/");
+ tab.set_pathcontent(&root_path)
}
fn read_nvim_listen_address_if_needed(status: &mut Status) {