0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

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

@@ -5020,7 +5020,6 @@ static void aff_check_string __ARGS((char_u *spinval, char_u *affval, char *name
static int str_equal __ARGS((char_u *s1, char_u *s2));
static void add_fromto __ARGS((spellinfo_T *spin, garray_T *gap, char_u *from, char_u *to));
static int sal_to_bool __ARGS((char_u *s));
static int has_non_ascii __ARGS((char_u *s));
static void spell_free_aff __ARGS((afffile_T *aff));
static int spell_read_dic __ARGS((spellinfo_T *spin, char_u *fname, afffile_T *affile));
static int get_affix_flags __ARGS((afffile_T *affile, char_u *afflist));
@@ -6484,23 +6483,6 @@ sal_to_bool(s)
return STRCMP(s, "1") == 0 || STRCMP(s, "true") == 0;
}
/*
* Return TRUE if string "s" contains a non-ASCII character (128 or higher).
* When "s" is NULL FALSE is returned.
*/
static 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;
}
/*
* Free the structure filled by spell_read_aff().
*/