refactor: do not pass argument unnecessarily

pull/13197/head
Nik Revenco 2025-04-02 16:00:49 +01:00
parent a51334f00b
commit b1c7bd91b9
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -1740,9 +1740,9 @@ impl Editor {
} }
/// Use when Helix is opened with no arguments passed /// 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( self.new_file_from_document(
action, Action::VerticalSplit,
Document::default(self.config.clone()).with_welcome(), Document::default(self.config.clone()).with_welcome(),
) )
} }