changeset 12863:e7ec107f6354 v8.0.1308

patch 8.0.1308: the "Reading from stdin" message may be undesired commit https://github.com/vim/vim/commit/234d16286a2733adedef56784c17415ae169b9ad Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 18 14:55:23 2017 +0100 patch 8.0.1308: the "Reading from stdin" message may be undesired Problem: The "Reading from stdin" message may be undesired and there is no easy way to skip it. Solution: Don't show the message with --not-a-term was used.
author Christian Brabandt <cb@256bit.org>
date Sat, 18 Nov 2017 15:00:04 +0100
parents 9c21b0f08a37
children e98532b79dba
files src/fileio.c src/version.c
diffstat 2 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -849,17 +849,20 @@ readfile(
 	 */
 	if (read_stdin)
 	{
+	    if (!is_not_a_term())
+	    {
 #ifndef ALWAYS_USE_GUI
-	    mch_msg(_("Vim: Reading from stdin...\n"));
+		mch_msg(_("Vim: Reading from stdin...\n"));
 #endif
 #ifdef FEAT_GUI
-	    /* Also write a message in the GUI window, if there is one. */
-	    if (gui.in_use && !gui.dying && !gui.starting)
-	    {
-		p = (char_u *)_("Reading from stdin...");
-		gui_write(p, (int)STRLEN(p));
-	    }
-#endif
+		/* Also write a message in the GUI window, if there is one. */
+		if (gui.in_use && !gui.dying && !gui.starting)
+		{
+		    p = (char_u *)_("Reading from stdin...");
+		    gui_write(p, (int)STRLEN(p));
+		}
+#endif
+	    }
 	}
 	else if (!read_buffer)
 	    filemess(curbuf, sfname, (char_u *)"", 0);
--- a/src/version.c
+++ b/src/version.c
@@ -767,6 +767,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1308,
+/**/
     1307,
 /**/
     1306,