forked from aniani/vim
updated for version 7.1-051
This commit is contained in:
15
src/spell.c
15
src/spell.c
@@ -12182,7 +12182,9 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
|||||||
{
|
{
|
||||||
n = mb_cptr2len(p);
|
n = mb_cptr2len(p);
|
||||||
c = mb_ptr2char(p);
|
c = mb_ptr2char(p);
|
||||||
if (!soundfold && !spell_iswordp(p + n, curbuf))
|
if (p[n] == NUL)
|
||||||
|
c2 = NUL;
|
||||||
|
else if (!soundfold && !spell_iswordp(p + n, curbuf))
|
||||||
c2 = c; /* don't swap non-word char */
|
c2 = c; /* don't swap non-word char */
|
||||||
else
|
else
|
||||||
c2 = mb_ptr2char(p + n);
|
c2 = mb_ptr2char(p + n);
|
||||||
@@ -12190,12 +12192,21 @@ suggest_trie_walk(su, lp, fword, soundfold)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
if (!soundfold && !spell_iswordp(p + 1, curbuf))
|
if (p[1] == NUL)
|
||||||
|
c2 = NUL;
|
||||||
|
else if (!soundfold && !spell_iswordp(p + 1, curbuf))
|
||||||
c2 = c; /* don't swap non-word char */
|
c2 = c; /* don't swap non-word char */
|
||||||
else
|
else
|
||||||
c2 = p[1];
|
c2 = p[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* When the second character is NUL we can't swap. */
|
||||||
|
if (c2 == NUL)
|
||||||
|
{
|
||||||
|
sp->ts_state = STATE_REP_INI;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* When characters are identical, swap won't do anything.
|
/* When characters are identical, swap won't do anything.
|
||||||
* Also get here if the second char is not a word character. */
|
* Also get here if the second char is not a word character. */
|
||||||
if (c == c2)
|
if (c == c2)
|
||||||
|
|||||||
@@ -666,6 +666,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
51,
|
||||||
/**/
|
/**/
|
||||||
50,
|
50,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user