aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands/typed.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands/typed.rs')
-rw-r--r--helix-term/src/commands/typed.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/helix-term/src/commands/typed.rs b/helix-term/src/commands/typed.rs
index 0e1d9431..e38853c0 100644
--- a/helix-term/src/commands/typed.rs
+++ b/helix-term/src/commands/typed.rs
@@ -1536,10 +1536,8 @@ fn vsplit(
return Ok(());
}
- let id = view!(cx.editor).doc;
-
if args.is_empty() {
- cx.editor.switch(id, Action::VerticalSplit);
+ split(cx.editor, Action::VerticalSplit);
} else {
for arg in args {
cx.editor
@@ -1559,10 +1557,8 @@ fn hsplit(
return Ok(());
}
- let id = view!(cx.editor).doc;
-
if args.is_empty() {
- cx.editor.switch(id, Action::HorizontalSplit);
+ split(cx.editor, Action::HorizontalSplit);
} else {
for arg in args {
cx.editor