From cc4c78608b6b402a7d238a5cfb798aeb1b0c7647 Mon Sep 17 00:00:00 2001 From: Omnikar Date: Fri, 31 Dec 2021 12:38:29 -0500 Subject: [PATCH] Make `:help topics` open in a split --- helix-term/src/commands.rs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 9a7ede24c..1de10fc30 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -2772,14 +2772,17 @@ pub mod cmd { .map(From::from) .unwrap_or_default() }, - |editor, path, action| { - if let Err(e) = editor.open(path.clone(), action).and_then(|id| { - editor - .document_mut(id) - .unwrap() - .set_path(None) - .map_err(Into::into) - }) { + |editor, path, _action| { + if let Err(e) = editor + .open(path.clone(), Action::HorizontalSplit) + .and_then(|id| { + editor + .document_mut(id) + .unwrap() + .set_path(None) + .map_err(Into::into) + }) + { editor.set_error(e.to_string()); } },