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 | 0ba17fe4e6725f509fd23c67e58609b322e7107b (patch) | |
tree | d487f37290181f27567a4bf2b0ba61373a0bda84 | |
parent | c4568930f1f031fbe37a8724371353ee01a1b1e2 (diff) | |
download | vim-0ba17fe4e6725f509fd23c67e58609b322e7107b.tar.gz |
Problem: When 'encoding' is a double-byte encoding ":helptags" may not find
tags correctly.
Solution: Use vim_strbyte() instead of vim_strchr(). (Yasuhiro Matsumoto)
-rw-r--r-- | src/ex_cmds.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index d719826b..a17b40cb 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) diff --git a/src/version.c b/src/version.c index 0f40176e..b05c8434 100644 --- a/src/version.c +++ b/src/version.c @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 518, +/**/ 517, /**/ 516, |