patch 8.0.1036: ++eof argument for terminal only available on MS-Windows
Problem: ++eof argument for terminal only available on MS-Windows.
Solution: Also support ++eof on Unix. Add a test.
diff --git a/src/channel.c b/src/channel.c
index 5a7e2a7..30a4304 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -1422,9 +1422,8 @@
in_part->ch_buf_top = lnum;
if (lnum > buf->b_ml.ml_line_count || lnum > in_part->ch_buf_bot)
{
-#if defined(WIN32) && defined(FEAT_TERMINAL)
- /* Send CTRL-D or "eof_chars" to close stdin on Windows. A console
- * application doesn't treat closing stdin like UNIX. */
+#if defined(FEAT_TERMINAL)
+ /* Send CTRL-D or "eof_chars" to close stdin on MS-Windows. */
if (channel->ch_job != NULL)
term_send_eof(channel);
#endif
@@ -4640,7 +4639,6 @@
}
else if (STRCMP(hi->hi_key, "eof_chars") == 0)
{
-# ifdef WIN3264
char_u *p;
if (!(supported2 & JO2_EOF_CHARS))
@@ -4652,7 +4650,6 @@
EMSG2(_(e_invarg2), "term_opencmd");
return FAIL;
}
-# endif
}
else if (STRCMP(hi->hi_key, "term_rows") == 0)
{