diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-01-10 16:28:45 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-01-10 16:28:45 +0100 |
commit | 10b7b39b3d5bc22d6798cd69fd01c4471669980a (patch) | |
tree | da50f4f535a78f1543e23b979bafcc37e0384f80 /src/misc2.c | |
parent | 6ee8d89cf9c283992323ab6d9ff3b59390639ee9 (diff) | |
download | vim-git-10b7b39b3d5bc22d6798cd69fd01c4471669980a.tar.gz |
updated for version 7.3.397v7.3.397
Problem: ":helpgrep" does not work properly when 'encoding' is not utf-8 or
latin1.
Solution: Convert non-ascii lines to 'encoding'. (Yasuhiro Matsumoto)
Diffstat (limited to 'src/misc2.c')
-rw-r--r-- | src/misc2.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/misc2.c b/src/misc2.c index 784e4889f..96c3a3638 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -6541,3 +6541,23 @@ put_time(fd, the_time) #endif #endif + +#if (defined(FEAT_MBYTE) && defined(FEAT_QUICKFIX)) \ + || defined(FEAT_SPELL) || defined(PROTO) +/* + * Return TRUE if string "s" contains a non-ASCII character (128 or higher). + * When "s" is NULL FALSE is returned. + */ + int +has_non_ascii(s) + char_u *s; +{ + char_u *p; + + if (s != NULL) + for (p = s; *p != NUL; ++p) + if (*p >= 128) + return TRUE; + return FALSE; +} +#endif |