0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.3.518

Problem:    When 'encoding' is a double-byte encoding ":helptags" may not find
            tags correctly.
Solution:   Use vim_strbyte() instead of vim_strchr(). (Yasuhiro Matsumoto)
This commit is contained in:
Bram Moolenaar
2012-05-18 16:24:11 +02:00
parent 1aeaf8c0e0
commit a0149c7401
2 changed files with 6 additions and 1 deletions

View File

@@ -6535,7 +6535,10 @@ helptags_one(dir, ext, tagfname, add_help_tags)
p1 = vim_strchr(IObuff, '*'); /* find first '*' */
while (p1 != NULL)
{
p2 = vim_strchr(p1 + 1, '*'); /* find second '*' */
/* Use vim_strbyte() instead of vim_strchr() so that when
* 'encoding' is dbcs it still works, don't find '*' in the
* second byte. */
p2 = vim_strbyte(p1 + 1, '*'); /* find second '*' */
if (p2 != NULL && p2 > p1 + 1) /* skip "*" and "**" */
{
for (s = p1 + 1; s < p2; ++s)