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:
20
src/misc2.c
20
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
|
||||
|
Reference in New Issue
Block a user