From da41b5907a97326ede110cfeac1f27c9f8aaecd6 Mon Sep 17 00:00:00 2001 From: qkzk Date: Sun, 5 Nov 2023 14:36:25 +0100 Subject: select prev --- src/tab.rs | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/tab.rs') diff --git a/src/tab.rs b/src/tab.rs index 31d0d6b..9d0cbbe 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -366,12 +366,12 @@ impl Tab { /// Select the next sibling. pub fn tree_select_next(&mut self) -> Result<()> { - self.directory.select_next() + self.tree.select_next() } /// Select the previous siblging pub fn tree_select_prev(&mut self) -> Result<()> { - self.directory.select_prev() + self.tree.select_prev() } /// Select the first child if any. @@ -540,16 +540,14 @@ impl Tab { self.tree_select_first_child() } - /// Select the next sibling of the current node. - pub fn select_next(&mut self) -> Result<()> { - self.tree.next(); - self.tree_select_next() - } - /// Select the previous sibling of the current node. pub fn select_prev(&mut self) -> Result<()> { - self.tree.prev(); - self.tree_select_prev() + self.tree.select_prev() + } + + /// Select the next sibling of the current node. + pub fn select_next(&mut self) -> Result<()> { + self.tree.select_next() } /// Copy the selected filename to the clipboard. Only the filename. -- cgit v1.2.3