diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-05-18 16:24:11 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-05-18 16:24:11 +0200 |
commit | a0149c7401e650efa247bf37d7a407493d72ca21 (patch) | |
tree | 1e67cf17a8ad049b5c2aa6f44616f9f2d6e5c1ce /src/ex_cmds.c | |
parent | 1aeaf8c0e0421f34e51ef674f0c9a182debe77ae (diff) | |
download | vim-git-a0149c7401e650efa247bf37d7a407493d72ca21.tar.gz |
updated for version 7.3.518v7.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)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index d719826bc..a17b40cb6 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -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) |