From e7e47fd54263fb46f2dbb6fe8954fa489d143752 Mon Sep 17 00:00:00 2001 From: mejo13 Date: Tue, 17 Jan 2023 23:15:21 +0100 Subject: Add command to rotate view backward (#5356) --- helix-view/src/editor.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'helix-view/src') 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) { -- cgit v1.2.3-70-g09d2