]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1423 v7.4.1423
authorBram Moolenaar <Bram@vim.org>
Fri, 26 Feb 2016 10:52:39 +0000 (11:52 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 26 Feb 2016 10:52:39 +0000 (11:52 +0100)
Problem:    Channel test fails on MS-Windows.
Solution:   Do not give an error message when reading fails, assume the other
            end exited.

src/channel.c
src/version.c

index 03dbdc30175ecba4612b6a6c5f4b2ec08d953532..9f6cdc7ca6004944f4d8a86eaa124e94a87ca437 100644 (file)
@@ -1763,10 +1763,13 @@ channel_read(channel_T *channel, int part, char *func)
            break;      /* did read everything that's available */
     }
 
-    /* Reading a disconnection (readlen == 0), or an error.
-     * TODO: call error callback. */
+    /* Reading a disconnection (readlen == 0), or an error. */
     if (readlen <= 0)
     {
+       /* Do not give an error message, most likely the other end just
+        * exited. */
+       ch_errors(channel, "%s(): Cannot read from channel", func);
+
        /* Queue a "DETACH" netbeans message in the command queue in order to
         * terminate the netbeans session later. Do not end the session here
         * directly as we may be running in the context of a call to
@@ -1777,13 +1780,6 @@ channel_read(channel_T *channel, int part, char *func)
         *                  -> gui event loop or select loop
         *                      -> channel_read()
         */
-       ch_errors(channel, "%s(): Cannot read", func);
-       if (len < 0)
-       {
-           ch_error(channel, "channel_read(): cannot read from channel");
-           PERROR(_("E896: read from channel"));
-       }
-
        msg = channel->ch_part[part].ch_mode == MODE_RAW
                                  || channel->ch_part[part].ch_mode == MODE_NL
                    ? DETACH_MSG_RAW : DETACH_MSG_JSON;
index 08c8c1a8ed244ad0df3d9ccb99b0c85c1f2657cd..5e246f9dd477290f5f0e27ef96a6008945013b2e 100644 (file)
@@ -748,6 +748,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1423,
 /**/
     1422,
 /**/