Patch 7.4.1505
Problem:    When channel log is enabled get too many "looking for messages"
            log entries.
Solution:   Only give the message after another message.
Files:      src/channel.c


*** ../vim-7.4.1504/src/channel.c       2016-03-06 20:22:20.352165976 +0100
--- src/channel.c       2016-03-06 21:46:34.062322338 +0100
***************
*** 136,141 ****
--- 136,143 ----
      }
  }
  
+ static int did_log_msg = TRUE;
+ 
      void
  ch_log(channel_T *ch, char *msg)
  {
***************
*** 145,150 ****
--- 147,153 ----
        fputs(msg, log_fd);
        fputc('\n', log_fd);
        fflush(log_fd);
+       did_log_msg = TRUE;
      }
  }
  
***************
*** 157,162 ****
--- 160,166 ----
        fprintf(log_fd, msg, nr);
        fputc('\n', log_fd);
        fflush(log_fd);
+       did_log_msg = TRUE;
      }
  }
  
***************
*** 169,174 ****
--- 173,179 ----
        fprintf(log_fd, msg, name);
        fputc('\n', log_fd);
        fflush(log_fd);
+       did_log_msg = TRUE;
      }
  }
  
***************
*** 181,186 ****
--- 186,192 ----
        fprintf(log_fd, msg, name, nr);
        fputc('\n', log_fd);
        fflush(log_fd);
+       did_log_msg = TRUE;
      }
  }
  
***************
*** 193,198 ****
--- 199,205 ----
        fputs(msg, log_fd);
        fputc('\n', log_fd);
        fflush(log_fd);
+       did_log_msg = TRUE;
      }
  }
  
***************
*** 205,210 ****
--- 212,218 ----
        fprintf(log_fd, msg, nr);
        fputc('\n', log_fd);
        fflush(log_fd);
+       did_log_msg = TRUE;
      }
  }
  
***************
*** 217,222 ****
--- 225,231 ----
        fprintf(log_fd, msg, arg);
        fputc('\n', log_fd);
        fflush(log_fd);
+       did_log_msg = TRUE;
      }
  }
  
***************
*** 2352,2357 ****
--- 2361,2367 ----
        ignored = (int)fwrite(buf, len, 1, log_fd);
        fprintf(log_fd, "'\n");
        fflush(log_fd);
+       did_log_msg = TRUE;
      }
  
      if (part == PART_SOCK)
***************
*** 2541,2547 ****
      int               r;
      int               part = PART_SOCK;
  
!     ch_log(NULL, "looking for messages on channels");
      while (channel != NULL)
      {
        if (channel->ch_refcount == 0 && !channel_still_useful(channel))
--- 2551,2563 ----
      int               r;
      int               part = PART_SOCK;
  
!     /* Only do this message when another message was given, otherwise we get
!      * lots of them. */
!     if (did_log_msg)
!     {
!       ch_log(NULL, "looking for messages on channels");
!       did_log_msg = FALSE;
!     }
      while (channel != NULL)
      {
        if (channel->ch_refcount == 0 && !channel_still_useful(channel))
*** ../vim-7.4.1504/src/version.c       2016-03-06 21:35:53.545137298 +0100
--- src/version.c       2016-03-06 21:48:34.261049524 +0100
***************
*** 745,746 ****
--- 745,748 ----
  {   /* Add new patch number below this line */
+ /**/
+     1505,
  /**/

-- 
Normal people believe that if it ain't broke, don't fix it.  Engineers believe
that if it ain't broke, it doesn't have enough features yet.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui