Mercurial > vim
changeset 23128:448da19cb3d5 v8.2.2110
patch 8.2.2110: cannot use ":shell" when reading from stdin
Commit: https://github.com/vim/vim/commit/8e1cbb55c389bdc4eade7a67309d5042fbcdca7d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 8 19:36:21 2020 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Dec 2020 19:45:04 +0100 |
parents | d1ea7d6807c2 |
children | da3f1953a1c8 |
files | src/main.c src/version.c |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 } /*