Blob Blame History Raw
To: vim-dev@vim.org
Subject: Patch 7.0.133
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
------------

Patch 7.0.133
Problem:    When searching included files messages are added to the history.
Solution:   Set msg_hist_off for messages about scanning included files.
            Set msg_silent to avoid message about wrapping around.
Files:	    src/edit.c, src/globals.h, src/message.c, src/search.c


*** ../vim-7.0.132/src/edit.c	Tue Oct 10 15:49:41 2006
--- src/edit.c	Sat Oct 14 14:22:09 2006
***************
*** 3909,3914 ****
--- 3909,3916 ----
  	    {
  		int	flags = 0;
  
+ 		++msg_silent;  /* Don't want messages for wrapscan. */
+ 
  		/* ctrl_x_mode == CTRL_X_WHOLE_LINE || word-wise search that
  		 * has added a word that was at the beginning of the line */
  		if (	ctrl_x_mode == CTRL_X_WHOLE_LINE
***************
*** 3920,3925 ****
--- 3922,3928 ----
  							      compl_direction,
  				 compl_pattern, 1L, SEARCH_KEEP + SEARCH_NFMSG,
  							RE_LAST, (linenr_T)0);
+ 		--msg_silent;
  		if (!compl_started)
  		{
  		    /* set "compl_started" even on fail */
*** ../vim-7.0.132/src/globals.h	Tue Sep  5 12:57:14 2006
--- src/globals.h	Sat Oct 14 14:05:02 2006
***************
*** 166,171 ****
--- 166,172 ----
  EXTERN int	emsg_off INIT(= 0);	    /* don't display errors for now,
  					       unless 'debug' is set. */
  EXTERN int	info_message INIT(= FALSE); /* printing informative message */
+ EXTERN int      msg_hist_off INIT(= FALSE); /* don't add messages to history */
  #ifdef FEAT_EVAL
  EXTERN int	emsg_skip INIT(= 0);	    /* don't display errors for
  					       expression that is skipped */
*** ../vim-7.0.132/src/message.c	Tue Oct  3 17:21:04 2006
--- src/message.c	Sat Oct 14 14:03:58 2006
***************
*** 53,59 ****
  static struct msg_hist *first_msg_hist = NULL;
  static struct msg_hist *last_msg_hist = NULL;
  static int msg_hist_len = 0;
- static int msg_hist_off = FALSE;	/* don't add messages to history */
  
  /*
   * When writing messages to the screen, there are many different situations.
--- 53,58 ----
*** ../vim-7.0.132/src/search.c	Tue Aug 29 18:01:39 2006
--- src/search.c	Sat Oct 14 14:15:26 2006
***************
*** 4688,4693 ****
--- 4688,4694 ----
  #ifdef FEAT_INS_EXPAND
  		    if (action == ACTION_EXPAND)
  		    {
+ 			msg_hist_off = TRUE;	/* reset in msg_trunc_attr() */
  			vim_snprintf((char*)IObuff, IOSIZE,
  				_("Scanning included file: %s"),
  				(char *)new_fname);
*** ../vim-7.0.132/src/version.c	Thu Oct 12 21:15:04 2006
--- src/version.c	Sat Oct 14 14:32:31 2006
***************
*** 668,669 ****
--- 668,671 ----
  {   /* Add new patch number below this line */
+ /**/
+     133,
  /**/

-- 
You have the right to remain silent. Anything you say will be
misquoted, then used against you.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///