Skip to content

Commit

Permalink
feat(editor): scrollback positioning with Helix (#2156)
Browse files Browse the repository at this point in the history
* Add Helix editor (`hx`) to editors that support prefix positions

This is dependant on Helix accepting the PR:

helix-editor/helix#5945

* Add `helix` variant to accepted editors

* Add branch for Helix file opening

* style(code): add clarification comment

* style(fmt): whitespace

---------

Co-authored-by: Aram Drevekenin <[email protected]>
  • Loading branch information
bheylin and imsnif authored Feb 18, 2023
1 parent ada08cc commit c8fdea8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion zellij-server/src/os_input_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,18 @@ fn spawn_terminal(
{
failover_cmd_args = Some(vec![file_to_open.clone()]);
args.push(format!("+{}", line_number));
args.push(file_to_open);
} else if command.ends_with("hx") || command.ends_with("helix") {
// at the time of writing, helix only supports this syntax
// and it might be a good idea to leave this here anyway
// to keep supporting old versions
args.push(format!("{}:{}", file_to_open, line_number));
} else {
args.push(file_to_open);
}
} else {
args.push(file_to_open);
}
args.push(file_to_open);
RunCommand {
command,
args,
Expand Down

0 comments on commit c8fdea8

Please sign in to comment.