From 619c8f4b9143e4dea0fb967ccdce594e14956ed3 Mon Sep 17 00:00:00 2001 From: hlpr98 Date: Sat, 16 Apr 2022 14:46:20 +0200 Subject: feat(api): support handling stdin stream in remote ui --- src/nvim/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/main.c') diff --git a/src/nvim/main.c b/src/nvim/main.c index 952064ab73..253a89467e 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -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 && !recoverymode) { + if ((params.edit_type == EDIT_STDIN || implicit_readstdin) && !recoverymode) { read_stdin(); } -- cgit From ad63b94b03c166f37bda477db6cbac2a9583d586 Mon Sep 17 00:00:00 2001 From: bfredl Date: Fri, 22 Apr 2022 20:56:31 +0200 Subject: refactor(ui): simplify stdin handling --- src/nvim/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nvim/main.c') diff --git a/src/nvim/main.c b/src/nvim/main.c index 253a89467e..5a496a10b4 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -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(); } -- cgit