Skip to content

Commit 09fcb03

Browse files
committed
updated for version 7.3.240
Problem: External commands can't use pipes on MS-Windows. Solution: Implement pipes and use them when 'shelltemp' isn't set. (Vincent Berthoux)
1 parent dab1828 commit 09fcb03

File tree

8 files changed

+540
-29
lines changed

8 files changed

+540
-29
lines changed

src/eval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11931,7 +11931,7 @@ f_has(argvars, rettv)
1193111931
#ifdef FEAT_SEARCHPATH
1193211932
"file_in_path",
1193311933
#endif
11934-
#if defined(UNIX) && !defined(USE_SYSTEM)
11934+
#if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264)
1193511935
"filterpipe",
1193611936
#endif
1193711937
#ifdef FEAT_FIND_ID

src/ex_cmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ do_filter(line1, line2, eap, cmd, do_in, do_out)
11071107
if (do_out)
11081108
shell_flags |= SHELL_DOOUT;
11091109

1110-
#if !defined(USE_SYSTEM) && defined(UNIX)
1110+
#if (!defined(USE_SYSTEM) && defined(UNIX)) || defined(WIN3264)
11111111
if (!do_in && do_out && !p_stmp)
11121112
{
11131113
/* Use a pipe to fetch stdout of the command, do not use a temp file. */

src/misc2.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,6 +2146,25 @@ ga_append(gap, c)
21462146
}
21472147
}
21482148

2149+
#if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264)
2150+
/*
2151+
* Append the text in "gap" below the cursor line and clear "gap".
2152+
*/
2153+
void
2154+
append_ga_line(gap)
2155+
garray_T *gap;
2156+
{
2157+
/* Remove trailing CR. */
2158+
if (gap->ga_len > 0
2159+
&& !curbuf->b_p_bin
2160+
&& ((char_u *)gap->ga_data)[gap->ga_len - 1] == CAR)
2161+
--gap->ga_len;
2162+
ga_append(gap, NUL);
2163+
ml_append(curwin->w_cursor.lnum++, gap->ga_data, 0, FALSE);
2164+
gap->ga_len = 0;
2165+
}
2166+
#endif
2167+
21492168
/************************************************************************
21502169
* functions that use lookup tables for various things, generally to do with
21512170
* special key codes.

src/os_unix.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3660,27 +3660,6 @@ mch_new_shellsize()
36603660
/* Nothing to do. */
36613661
}
36623662

3663-
#ifndef USE_SYSTEM
3664-
static void append_ga_line __ARGS((garray_T *gap));
3665-
3666-
/*
3667-
* Append the text in "gap" below the cursor line and clear "gap".
3668-
*/
3669-
static void
3670-
append_ga_line(gap)
3671-
garray_T *gap;
3672-
{
3673-
/* Remove trailing CR. */
3674-
if (gap->ga_len > 0
3675-
&& !curbuf->b_p_bin
3676-
&& ((char_u *)gap->ga_data)[gap->ga_len - 1] == CAR)
3677-
--gap->ga_len;
3678-
ga_append(gap, NUL);
3679-
ml_append(curwin->w_cursor.lnum++, gap->ga_data, 0, FALSE);
3680-
gap->ga_len = 0;
3681-
}
3682-
#endif
3683-
36843663
int
36853664
mch_call_shell(cmd, options)
36863665
char_u *cmd;

0 commit comments

Comments
 (0)