summaryrefslogtreecommitdiff
path: root/src/misc2.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2011-07-07 16:20:52 +0200
committerBram Moolenaar <Bram@vim.org>2011-07-07 16:20:52 +0200
commit4b9669f1dc0b1f30a378624810ca144b9ca49a8e (patch)
tree0ece3d6ce68a283ebb37ccf0334a8a37c510e53c /src/misc2.c
parent03a807aaf45e5f85a10cd3b0c4e4913d170f8f5a (diff)
downloadvim-4b9669f1dc0b1f30a378624810ca144b9ca49a8e.zip
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)
Diffstat (limited to 'src/misc2.c')
-rw-r--r--src/misc2.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/misc2.c b/src/misc2.c
index 9479a53c2..b7e7d01ea 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -2146,6 +2146,25 @@ ga_append(gap, c)
}
}
+#if (defined(UNIX) && !defined(USE_SYSTEM)) || defined(WIN3264)
+/*
+ * Append the text in "gap" below the cursor line and clear "gap".
+ */
+ void
+append_ga_line(gap)
+ garray_T *gap;
+{
+ /* Remove trailing CR. */
+ if (gap->ga_len > 0
+ && !curbuf->b_p_bin
+ && ((char_u *)gap->ga_data)[gap->ga_len - 1] == CAR)
+ --gap->ga_len;
+ ga_append(gap, NUL);
+ ml_append(curwin->w_cursor.lnum++, gap->ga_data, 0, FALSE);
+ gap->ga_len = 0;
+}
+#endif
+
/************************************************************************
* functions that use lookup tables for various things, generally to do with
* special key codes.