mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.0083
This commit is contained in:
parent
3eb98fbbd8
commit
c669e66fb6
@ -1583,20 +1583,21 @@ utfc_ptr2len_check(p)
|
|||||||
char_u *p;
|
char_u *p;
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
int b0 = *p;
|
||||||
#ifdef FEAT_ARABIC
|
#ifdef FEAT_ARABIC
|
||||||
int prevlen;
|
int prevlen;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (*p == NUL)
|
if (b0 == NUL)
|
||||||
return 0;
|
return 0;
|
||||||
if (p[0] < 0x80 && p[1] < 0x80) /* be quick for ASCII */
|
if (b0 < 0x80 && p[1] < 0x80) /* be quick for ASCII */
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Skip over first UTF-8 char, stopping at a NUL byte. */
|
/* Skip over first UTF-8 char, stopping at a NUL byte. */
|
||||||
len = utf_ptr2len_check(p);
|
len = utf_ptr2len_check(p);
|
||||||
|
|
||||||
/* Check for illegal byte. */
|
/* Check for illegal byte. */
|
||||||
if (len == 1 && p[0] >= 0x80)
|
if (len == 1 && b0 >= 0x80)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user