feat(editor): scrollback positioning with Helix (#2156)
* Add Helix editor (`hx`) to editors that support prefix positions This is dependant on Helix accepting the PR: https://github.com/helix-editor/helix/pull/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 <aram@poor.dev>
This commit is contained in:
parent
ada08cc005
commit
c8fdea88ec
1 changed files with 10 additions and 1 deletions
|
|
@ -303,9 +303,18 @@ fn spawn_terminal(
|
||||||
{
|
{
|
||||||
failover_cmd_args = Some(vec![file_to_open.clone()]);
|
failover_cmd_args = Some(vec![file_to_open.clone()]);
|
||||||
args.push(format!("+{}", line_number));
|
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 {
|
RunCommand {
|
||||||
command,
|
command,
|
||||||
args,
|
args,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue