1
0
forked from aniani/vim

updated for version 7.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)
This commit is contained in:
Bram Moolenaar
2012-01-10 16:28:45 +01:00
parent 6ee8d89cf9
commit 10b7b39b3d
5 changed files with 64 additions and 24 deletions

View File

@@ -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