Karsten Hopp a38327
To: vim_dev@googlegroups.com
Karsten Hopp a38327
Subject: Patch 7.3.331
Karsten Hopp a38327
Fcc: outbox
Karsten Hopp a38327
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp a38327
Mime-Version: 1.0
Karsten Hopp a38327
Content-Type: text/plain; charset=UTF-8
Karsten Hopp a38327
Content-Transfer-Encoding: 8bit
Karsten Hopp a38327
------------
Karsten Hopp a38327
Karsten Hopp a38327
Patch 7.3.331
Karsten Hopp a38327
Problem:    "vit" selects wrong text when a tag name starts with the same text
Karsten Hopp a38327
	    as an outer tag name. (Ben Fritz)
Karsten Hopp a38327
Solution:   Add "\>" to the pattern to check for word boundary.
Karsten Hopp a38327
Files:	    src/search.c
Karsten Hopp a38327
Karsten Hopp a38327
Karsten Hopp a38327
*** ../vim-7.3.330/src/search.c	2011-07-15 13:21:24.000000000 +0200
Karsten Hopp a38327
--- src/search.c	2011-10-04 16:54:08.000000000 +0200
Karsten Hopp a38327
***************
Karsten Hopp a38327
*** 3927,3933 ****
Karsten Hopp a38327
  	curwin->w_cursor = old_pos;
Karsten Hopp a38327
  	goto theend;
Karsten Hopp a38327
      }
Karsten Hopp a38327
!     sprintf((char *)spat, "<%.*s\\%%(\\_[^>]\\{-}[^/]>\\|>\\)\\c", len, p);
Karsten Hopp a38327
      sprintf((char *)epat, "</%.*s>\\c", len, p);
Karsten Hopp a38327
  
Karsten Hopp a38327
      r = do_searchpair(spat, (char_u *)"", epat, FORWARD, (char_u *)"",
Karsten Hopp a38327
--- 3927,3933 ----
Karsten Hopp a38327
  	curwin->w_cursor = old_pos;
Karsten Hopp a38327
  	goto theend;
Karsten Hopp a38327
      }
Karsten Hopp a38327
!     sprintf((char *)spat, "<%.*s\\>\\%%(\\_[^>]\\{-}[^/]>\\|>\\)\\c", len, p);
Karsten Hopp a38327
      sprintf((char *)epat, "</%.*s>\\c", len, p);
Karsten Hopp a38327
  
Karsten Hopp a38327
      r = do_searchpair(spat, (char_u *)"", epat, FORWARD, (char_u *)"",
Karsten Hopp a38327
*** ../vim-7.3.330/src/version.c	2011-10-04 16:43:49.000000000 +0200
Karsten Hopp a38327
--- src/version.c	2011-10-04 16:59:47.000000000 +0200
Karsten Hopp a38327
***************
Karsten Hopp a38327
*** 711,712 ****
Karsten Hopp a38327
--- 711,714 ----
Karsten Hopp a38327
  {   /* Add new patch number below this line */
Karsten Hopp a38327
+ /**/
Karsten Hopp a38327
+     331,
Karsten Hopp a38327
  /**/
Karsten Hopp a38327
Karsten Hopp a38327
-- 
Karsten Hopp a38327
The 50-50-90 rule: Anytime you have a 50-50 chance of getting
Karsten Hopp a38327
something right, there's a 90% probability you'll get it wrong.
Karsten Hopp a38327
Karsten Hopp a38327
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp a38327
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp a38327
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp a38327
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///