Mercurial > vim
changeset 3514:ec4ab9d832b0 v7.3.518
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 18 May 2012 16:24:11 +0200 |
parents | 1b584a6f446c |
children | 402e07514b00 |
files | src/ex_cmds.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -6535,7 +6535,10 @@ helptags_one(dir, ext, tagfname, add_hel 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)