Blob Blame History Raw
To: vim_dev@googlegroups.com
Subject: Patch 7.4.105
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.4.105
Problem:    Completing a tag pattern may give an error for invalid pattern.
Solution:   Suppress the error, just return no matches.
Files:	    src/tag.c


*** ../vim-7.4.104/src/tag.c	2013-11-08 04:30:06.000000000 +0100
--- src/tag.c	2013-11-28 14:27:38.000000000 +0100
***************
*** 1326,1331 ****
--- 1326,1332 ----
      int		match_no_ic = 0;/* matches with rm_ic == FALSE */
      int		match_re;	/* match with regexp */
      int		matchoff = 0;
+     int		save_emsg_off;
  
  #ifdef FEAT_EMACS_TAGS
      /*
***************
*** 1442,1448 ****
--- 1443,1452 ----
      if (p_tl != 0 && orgpat.len > p_tl)		/* adjust for 'taglength' */
  	orgpat.len = p_tl;
  
+     save_emsg_off = emsg_off;
+     emsg_off = TRUE;  /* don't want error for invalid RE here */
      prepare_pats(&orgpat, has_re);
+     emsg_off = save_emsg_off;
      if (has_re && orgpat.regmatch.regprog == NULL)
  	goto findtag_end;
  
*** ../vim-7.4.104/src/version.c	2013-11-28 14:20:11.000000000 +0100
--- src/version.c	2013-11-28 14:30:35.000000000 +0100
***************
*** 740,741 ****
--- 740,743 ----
  {   /* Add new patch number below this line */
+ /**/
+     105,
  /**/

-- 
The goal of science is to build better mousetraps.
The goal of nature is to build better mice.

 /// Bram Moolenaar -- Bram@Moolenaar.net -- 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    ///