From 8958bf0a926a6e6afc63f0c59f3fa6761f5da709 Mon Sep 17 00:00:00 2001 From: Roland Kovacs Date: Fri, 20 May 2022 03:25:04 +0200 Subject: Implement view transpose (#2461) Change the layout of existing split view from horizontal to vertical and vica-versa. It only effects the focused view and its siblings, i.e. not recursive. Command is mapped to 't' or 'C-t' under the Window menus.--- helix-view/src/editor.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'helix-view/src/editor.rs') diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index f4a48ba6..1ad21059 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -885,6 +885,10 @@ impl Editor { self.tree.focus_direction(tree::Direction::Down); } + pub fn transpose_view(&mut self) { + self.tree.transpose(); + } + pub fn should_close(&self) -> bool { self.tree.is_empty() } -- cgit v1.2.3-70-g09d2