Karsten Hopp a468f7
To: vim_dev@googlegroups.com
Karsten Hopp a468f7
Subject: Patch 7.3.518
Karsten Hopp a468f7
Fcc: outbox
Karsten Hopp a468f7
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp a468f7
Mime-Version: 1.0
Karsten Hopp a468f7
Content-Type: text/plain; charset=UTF-8
Karsten Hopp a468f7
Content-Transfer-Encoding: 8bit
Karsten Hopp a468f7
------------
Karsten Hopp a468f7
Karsten Hopp a468f7
Patch 7.3.518
Karsten Hopp a468f7
Problem:    When 'encoding' is a double-byte encoding ":helptags" may not find
Karsten Hopp a468f7
	    tags correctly.
Karsten Hopp a468f7
Solution:   Use vim_strbyte() instead of vim_strchr(). (Yasuhiro Matsumoto)
Karsten Hopp a468f7
Files:	    src/ex_cmds.c
Karsten Hopp a468f7
Karsten Hopp a468f7
Karsten Hopp a468f7
*** ../vim-7.3.517/src/ex_cmds.c	2012-04-25 17:32:14.000000000 +0200
Karsten Hopp a468f7
--- src/ex_cmds.c	2012-05-18 16:20:20.000000000 +0200
Karsten Hopp a468f7
***************
Karsten Hopp a468f7
*** 6535,6541 ****
Karsten Hopp a468f7
  	    p1 = vim_strchr(IObuff, '*');	/* find first '*' */
Karsten Hopp a468f7
  	    while (p1 != NULL)
Karsten Hopp a468f7
  	    {
Karsten Hopp a468f7
! 		p2 = vim_strchr(p1 + 1, '*');	/* find second '*' */
Karsten Hopp a468f7
  		if (p2 != NULL && p2 > p1 + 1)	/* skip "*" and "**" */
Karsten Hopp a468f7
  		{
Karsten Hopp a468f7
  		    for (s = p1 + 1; s < p2; ++s)
Karsten Hopp a468f7
--- 6535,6544 ----
Karsten Hopp a468f7
  	    p1 = vim_strchr(IObuff, '*');	/* find first '*' */
Karsten Hopp a468f7
  	    while (p1 != NULL)
Karsten Hopp a468f7
  	    {
Karsten Hopp a468f7
! 		/* Use vim_strbyte() instead of vim_strchr() so that when
Karsten Hopp a468f7
! 		 * 'encoding' is dbcs it still works, don't find '*' in the
Karsten Hopp a468f7
! 		 * second byte. */
Karsten Hopp a468f7
! 		p2 = vim_strbyte(p1 + 1, '*');	/* find second '*' */
Karsten Hopp a468f7
  		if (p2 != NULL && p2 > p1 + 1)	/* skip "*" and "**" */
Karsten Hopp a468f7
  		{
Karsten Hopp a468f7
  		    for (s = p1 + 1; s < p2; ++s)
Karsten Hopp a468f7
*** ../vim-7.3.517/src/version.c	2012-05-18 12:49:33.000000000 +0200
Karsten Hopp a468f7
--- src/version.c	2012-05-18 16:23:50.000000000 +0200
Karsten Hopp a468f7
***************
Karsten Hopp a468f7
*** 716,717 ****
Karsten Hopp a468f7
--- 716,719 ----
Karsten Hopp a468f7
  {   /* Add new patch number below this line */
Karsten Hopp a468f7
+ /**/
Karsten Hopp a468f7
+     518,
Karsten Hopp a468f7
  /**/
Karsten Hopp a468f7
Karsten Hopp a468f7
-- 
Karsten Hopp a468f7
If all you have is a hammer, everything looks like a nail.
Karsten Hopp a468f7
When your hammer is C++, everything begins to look like a thumb.
Karsten Hopp a468f7
			-- Steve Hoflich, comp.lang.c++
Karsten Hopp a468f7
Karsten Hopp a468f7
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp a468f7
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp a468f7
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp a468f7
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///