From: Bram Moolenaar Date: Tue, 8 Dec 2020 18:36:21 +0000 (+0100) Subject: patch 8.2.2110: cannot use ":shell" when reading from stdin X-Git-Tag: v8.2.2110 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8e1cbb55c389bdc4eade7a67309d5042fbcdca7d;p=thirdparty%2Fvim.git patch 8.2.2110: cannot use ":shell" when reading from stdin Problem: Cannot use ":shell" when reading from stdin. (Gary Johnson) Solution: Revert patch 8.2.1833. --- diff --git a/src/main.c b/src/main.c index 1b7811a670..6c591b0a9f 100644 --- a/src/main.c +++ b/src/main.c @@ -2709,7 +2709,6 @@ read_stdin(void) set_buflisted(TRUE); // Create memfile and read from stdin. - // This will also dup stdin from stderr to read commands from. (void)open_buffer(TRUE, NULL, 0); no_wait_return = FALSE; @@ -2717,6 +2716,14 @@ read_stdin(void) TIME_MSG("reading stdin"); check_swap_exists_action(); + +#if !(defined(AMIGA) || defined(MACOS_X)) + // Dup stdin from stderr to read commands from, so that shell commands + // work. + // TODO: why is this needed, even though readfile() has done this? + close(0); + vim_ignored = dup(2); +#endif } /* diff --git a/src/version.c b/src/version.c index 5b4fa3951a..6580dbd831 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2110, /**/ 2109, /**/