mirror of https://github.com/helix-editor/helix
refactor: do not pass argument unnecessarily
parent
a51334f00b
commit
b1c7bd91b9
|
@ -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)]
|
||||||
|
|
|
@ -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(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue