aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authormejo132023-01-17 22:15:21 +0000
committerGitHub2023-01-17 22:15:21 +0000
commite7e47fd54263fb46f2dbb6fe8954fa489d143752 (patch)
treef663a9546a7d69f67232cdacae0c7b8f63d3ba59 /helix-view
parent9530fab4b6f320d212f966e46a0353931a010471 (diff)
Add command to rotate view backward (#5356)
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/editor.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 547a4ffb..4a44a00c 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -1285,6 +1285,10 @@ impl Editor {
self.focus(self.tree.next());
}
+ pub fn focus_prev(&mut self) {
+ self.focus(self.tree.prev());
+ }
+
pub fn focus_direction(&mut self, direction: tree::Direction) {
let current_view = self.tree.focus;
if let Some(id) = self.tree.find_split_in_direction(current_view, direction) {