refactor: do not pass argument unnecessarily

This commit is contained in:
Nik Revenco 2025-04-02 16:00:49 +01:00
parent a51334f00b
commit b1c7bd91b9
2 changed files with 4 additions and 4 deletions
helix-term/src
helix-view/src

View file

@ -215,11 +215,11 @@ impl Application {
editor.new_file(Action::VerticalSplit);
}
} else if stdin().is_tty() || cfg!(feature = "integration") {
editor.new_file_welcome(Action::VerticalSplit);
editor.new_file_welcome();
} else {
editor
.new_file_from_stdin(Action::VerticalSplit)
.unwrap_or_else(|_| editor.new_file_welcome(Action::VerticalSplit));
.unwrap_or_else(|_| editor.new_file_welcome());
}
#[cfg(windows)]

View file

@ -1740,9 +1740,9 @@ impl Editor {
}
/// Use when Helix is opened with no arguments passed
pub fn new_file_welcome(&mut self, action: Action) -> DocumentId {
pub fn new_file_welcome(&mut self) -> DocumentId {
self.new_file_from_document(
action,
Action::VerticalSplit,
Document::default(self.config.clone()).with_welcome(),
)
}