Skip to content

Commit 8e1cbb5

Browse files
committed
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.
1 parent 8a3da6a commit 8e1cbb5

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/main.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2709,14 +2709,21 @@ read_stdin(void)
27092709
set_buflisted(TRUE);
27102710

27112711
// Create memfile and read from stdin.
2712-
// This will also dup stdin from stderr to read commands from.
27132712
(void)open_buffer(TRUE, NULL, 0);
27142713

27152714
no_wait_return = FALSE;
27162715
msg_didany = i;
27172716
TIME_MSG("reading stdin");
27182717

27192718
check_swap_exists_action();
2719+
2720+
#if !(defined(AMIGA) || defined(MACOS_X))
2721+
// Dup stdin from stderr to read commands from, so that shell commands
2722+
// work.
2723+
// TODO: why is this needed, even though readfile() has done this?
2724+
close(0);
2725+
vim_ignored = dup(2);
2726+
#endif
27202727
}
27212728

27222729
/*

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2110,
753755
/**/
754756
2109,
755757
/**/

0 commit comments

Comments
 (0)