Karsten Hopp 4f6947
To: vim-dev@vim.org
Karsten Hopp 4f6947
Subject: Patch 7.0.133
Karsten Hopp 4f6947
Fcc: outbox
Karsten Hopp 4f6947
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 4f6947
Mime-Version: 1.0
Karsten Hopp 4f6947
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 4f6947
Content-Transfer-Encoding: 8bit
Karsten Hopp 4f6947
------------
Karsten Hopp 4f6947
Karsten Hopp 4f6947
Patch 7.0.133
Karsten Hopp 4f6947
Problem:    When searching included files messages are added to the history.
Karsten Hopp 4f6947
Solution:   Set msg_hist_off for messages about scanning included files.
Karsten Hopp 4f6947
            Set msg_silent to avoid message about wrapping around.
Karsten Hopp 4f6947
Files:	    src/edit.c, src/globals.h, src/message.c, src/search.c
Karsten Hopp 4f6947
Karsten Hopp 4f6947
Karsten Hopp 4f6947
*** ../vim-7.0.132/src/edit.c	Tue Oct 10 15:49:41 2006
Karsten Hopp 4f6947
--- src/edit.c	Sat Oct 14 14:22:09 2006
Karsten Hopp 4f6947
***************
Karsten Hopp 4f6947
*** 3909,3914 ****
Karsten Hopp 4f6947
--- 3909,3916 ----
Karsten Hopp 4f6947
  	    {
Karsten Hopp 4f6947
  		int	flags = 0;
Karsten Hopp 4f6947
  
Karsten Hopp 4f6947
+ 		++msg_silent;  /* Don't want messages for wrapscan. */
Karsten Hopp 4f6947
+ 
Karsten Hopp 4f6947
  		/* ctrl_x_mode == CTRL_X_WHOLE_LINE || word-wise search that
Karsten Hopp 4f6947
  		 * has added a word that was at the beginning of the line */
Karsten Hopp 4f6947
  		if (	ctrl_x_mode == CTRL_X_WHOLE_LINE
Karsten Hopp 4f6947
***************
Karsten Hopp 4f6947
*** 3920,3925 ****
Karsten Hopp 4f6947
--- 3922,3928 ----
Karsten Hopp 4f6947
  							      compl_direction,
Karsten Hopp 4f6947
  				 compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
Karsten Hopp 4f6947
  							RE_LAST, (linenr_T)0);
Karsten Hopp 4f6947
+ 		--msg_silent;
Karsten Hopp 4f6947
  		if (!compl_started)
Karsten Hopp 4f6947
  		{
Karsten Hopp 4f6947
  		    /* set "compl_started" even on fail */
Karsten Hopp 4f6947
*** ../vim-7.0.132/src/globals.h	Tue Sep  5 12:57:14 2006
Karsten Hopp 4f6947
--- src/globals.h	Sat Oct 14 14:05:02 2006
Karsten Hopp 4f6947
***************
Karsten Hopp 4f6947
*** 166,171 ****
Karsten Hopp 4f6947
--- 166,172 ----
Karsten Hopp 4f6947
  EXTERN int	emsg_off INIT(= 0);	    /* don't display errors for now,
Karsten Hopp 4f6947
  					       unless 'debug' is set. */
Karsten Hopp 4f6947
  EXTERN int	info_message INIT(= FALSE); /* printing informative message */
Karsten Hopp 4f6947
+ EXTERN int      msg_hist_off INIT(= FALSE); /* don't add messages to history */
Karsten Hopp 4f6947
  #ifdef FEAT_EVAL
Karsten Hopp 4f6947
  EXTERN int	emsg_skip INIT(= 0);	    /* don't display errors for
Karsten Hopp 4f6947
  					       expression that is skipped */
Karsten Hopp 4f6947
*** ../vim-7.0.132/src/message.c	Tue Oct  3 17:21:04 2006
Karsten Hopp 4f6947
--- src/message.c	Sat Oct 14 14:03:58 2006
Karsten Hopp 4f6947
***************
Karsten Hopp 4f6947
*** 53,59 ****
Karsten Hopp 4f6947
  static struct msg_hist *first_msg_hist = NULL;
Karsten Hopp 4f6947
  static struct msg_hist *last_msg_hist = NULL;
Karsten Hopp 4f6947
  static int msg_hist_len = 0;
Karsten Hopp 4f6947
- static int msg_hist_off = FALSE;	/* don't add messages to history */
Karsten Hopp 4f6947
  
Karsten Hopp 4f6947
  /*
Karsten Hopp 4f6947
   * When writing messages to the screen, there are many different situations.
Karsten Hopp 4f6947
--- 53,58 ----
Karsten Hopp 4f6947
*** ../vim-7.0.132/src/search.c	Tue Aug 29 18:01:39 2006
Karsten Hopp 4f6947
--- src/search.c	Sat Oct 14 14:15:26 2006
Karsten Hopp 4f6947
***************
Karsten Hopp 4f6947
*** 4688,4693 ****
Karsten Hopp 4f6947
--- 4688,4694 ----
Karsten Hopp 4f6947
  #ifdef FEAT_INS_EXPAND
Karsten Hopp 4f6947
  		    if (action == ACTION_EXPAND)
Karsten Hopp 4f6947
  		    {
Karsten Hopp 4f6947
+ 			msg_hist_off = TRUE;	/* reset in msg_trunc_attr() */
Karsten Hopp 4f6947
  			vim_snprintf((char*)IObuff, IOSIZE,
Karsten Hopp 4f6947
  				_("Scanning included file: %s"),
Karsten Hopp 4f6947
  				(char *)new_fname);
Karsten Hopp 4f6947
*** ../vim-7.0.132/src/version.c	Thu Oct 12 21:15:04 2006
Karsten Hopp 4f6947
--- src/version.c	Sat Oct 14 14:32:31 2006
Karsten Hopp 4f6947
***************
Karsten Hopp 4f6947
*** 668,669 ****
Karsten Hopp 4f6947
--- 668,671 ----
Karsten Hopp 4f6947
  {   /* Add new patch number below this line */
Karsten Hopp 4f6947
+ /**/
Karsten Hopp 4f6947
+     133,
Karsten Hopp 4f6947
  /**/
Karsten Hopp 4f6947
Karsten Hopp 4f6947
-- 
Karsten Hopp 4f6947
You have the right to remain silent. Anything you say will be
Karsten Hopp 4f6947
misquoted, then used against you.
Karsten Hopp 4f6947
Karsten Hopp 4f6947
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 4f6947
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 4f6947
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 4f6947
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///