From f9ff01dd9cff70e5a69b2e79b70357f884d466ed Mon Sep 17 00:00:00 2001 From: wongjiahau Date: Thu, 23 Feb 2023 10:31:52 +0800 Subject: [PATCH] chore(ui/tree): bind 'o' to Toggle --- changes | 2 +- helix-term/src/ui/tree.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changes b/changes index ccb65caa..d8fd436a 100644 --- a/changes +++ b/changes @@ -42,9 +42,9 @@ New: - [x] fix(explorer/preview): panic if not tall enough - [x] explorer(preview): content not sorted - [x] add integration test for Explorer +- [x] bind "o" to open/close file/folder - [] search highlight matching word - [] Error didn't clear -- [] bind "o" to open/close file/folder - [] should preview be there by default? - [] Fix panic bugs (see github comments) - [] Sticky ancestors diff --git a/helix-term/src/ui/tree.rs b/helix-term/src/ui/tree.rs index 486580c0..ee8aab3b 100644 --- a/helix-term/src/ui/tree.rs +++ b/helix-term/src/ui/tree.rs @@ -509,6 +509,7 @@ impl TreeView { pub fn tree_view_help() -> Vec<(&'static str, &'static str)> { vec![ + ("o, Enter", "Open/Close"), ("j, down", "Down"), ("k, up", "Up"), ("h, left", "Go to parent"), @@ -988,7 +989,7 @@ impl TreeView { }, shift!('H') => self.move_left(1), shift!('L') => self.move_right(1), - key!(Enter) => self.on_enter(cx, params, self.selected, filter), + key!(Enter) | key!('o') => self.on_enter(cx, params, self.selected, filter), ctrl!('d') => self.move_down_half_page(), ctrl!('u') => self.move_up_half_page(), key!('g') => {