refactor(ui): simplify stdin handling

This commit is contained in:
bfredl
2022-04-22 20:56:31 +02:00
parent 619c8f4b91
commit ad63b94b03
9 changed files with 106 additions and 53 deletions

View File

@@ -454,7 +454,7 @@ int main(int argc, char **argv)
// writing end of the pipe doesn't like, e.g., in case stdin and stderr
// are the same terminal: "cat | vim -".
// Using autocommands here may cause trouble...
if ((params.edit_type == EDIT_STDIN || implicit_readstdin) && !recoverymode) {
if ((params.edit_type == EDIT_STDIN || stdin_fd >= 0) && !recoverymode) {
read_stdin();
}