diff options
author | plexom | 2022-07-01 09:27:32 +0000 |
---|---|---|
committer | GitHub | 2022-07-01 09:27:32 +0000 |
commit | f10b6f6ee2bbf4d6d9356e27be25b25bdb85b9cd (patch) | |
tree | d6a949fcd15c85b9a682edf8559ca821b7c0b340 /helix-term/src/args.rs | |
parent | 15d96c843aca5b87fde26faf6c556265402c32c1 (diff) |
adds --vsplit and --hsplit arguments (#2773)
* adds --vsplit and --hsplit arguments
* moved comment
* fixed lint (third time's a charm)
* changed vsplit and hsplit from two separate bools to type Option<Layout>, and some cleanup
Diffstat (limited to 'helix-term/src/args.rs')
-rw-r--r-- | helix-term/src/args.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-term/src/args.rs b/helix-term/src/args.rs index b99c7d1a..c3019ea7 100644 --- a/helix-term/src/args.rs +++ b/helix-term/src/args.rs @@ -1,5 +1,6 @@ use anyhow::Result; use helix_core::Position; +use helix_view::tree::Layout; use std::path::{Path, PathBuf}; #[derive(Default)] @@ -11,6 +12,7 @@ pub struct Args { pub load_tutor: bool, pub fetch_grammars: bool, pub build_grammars: bool, + pub split: Option<Layout>, pub verbosity: u64, pub files: Vec<(PathBuf, Position)>, } @@ -28,6 +30,8 @@ impl Args { "--version" => args.display_version = true, "--help" => args.display_help = true, "--tutor" => args.load_tutor = true, + "--vsplit" => args.split = Some(Layout::Vertical), + "--hsplit" => args.split = Some(Layout::Horizontal), "--health" => { args.health = true; args.health_arg = argv.next_if(|opt| !opt.starts_with('-')); |