Skip to content

Commit

Permalink
Undo function rename
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealLorenz committed Aug 31, 2023
1 parent ffed075 commit 82d628f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions helix-term/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4831,7 +4831,7 @@ fn transpose_view(cx: &mut Context) {
/// Open a new split in the given direction specified by the action.
///
/// Maintain the current view (both the cursor's position and view in document).
fn split_helper(editor: &mut Editor, action: Action) {
fn split(editor: &mut Editor, action: Action) {
let (view, doc) = current!(editor);
let id = doc.id();
let selection = doc.selection(view.id).clone();
Expand All @@ -4848,15 +4848,15 @@ fn split_helper(editor: &mut Editor, action: Action) {
}

fn hsplit(cx: &mut Context) {
split_helper(cx.editor, Action::HorizontalSplit);
split(cx.editor, Action::HorizontalSplit);
}

fn hsplit_new(cx: &mut Context) {
cx.editor.new_file(Action::HorizontalSplit);
}

fn vsplit(cx: &mut Context) {
split_helper(cx.editor, Action::VerticalSplit);
split(cx.editor, Action::VerticalSplit);
}

fn vsplit_new(cx: &mut Context) {
Expand Down
4 changes: 2 additions & 2 deletions helix-term/src/commands/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,7 @@ fn vsplit(
}

if args.is_empty() {
split_helper(cx.editor, Action::VerticalSplit);
split(cx.editor, Action::VerticalSplit);
} else {
for arg in args {
cx.editor
Expand All @@ -1560,7 +1560,7 @@ fn hsplit(
}

if args.is_empty() {
split_helper(cx.editor, Action::HorizontalSplit);
split(cx.editor, Action::HorizontalSplit);
} else {
for arg in args {
cx.editor
Expand Down

0 comments on commit 82d628f

Please sign in to comment.