refactor: do not pass argument unnecessarily
This commit is contained in:
parent
a51334f00b
commit
b1c7bd91b9
2 changed files with 4 additions and 4 deletions
|
@ -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)]
|
||||
|
|
|
@ -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(),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue