forked from aniani/vim
patch 8.2.2379: do spell suggestions twice if 'spellsuggest' contains number
Problem: Finding spell suggestions twice if 'spellsuggest' contains number. Solution: Only do internal suggestions once. (closes #7713)
This commit is contained in:
@@ -770,6 +770,7 @@ spell_find_suggest(
|
|||||||
int c;
|
int c;
|
||||||
int i;
|
int i;
|
||||||
langp_T *lp;
|
langp_T *lp;
|
||||||
|
int did_intern = FALSE;
|
||||||
|
|
||||||
// Set the info in "*su".
|
// Set the info in "*su".
|
||||||
CLEAR_POINTER(su);
|
CLEAR_POINTER(su);
|
||||||
@@ -863,12 +864,13 @@ spell_find_suggest(
|
|||||||
else if (STRNCMP(buf, "file:", 5) == 0)
|
else if (STRNCMP(buf, "file:", 5) == 0)
|
||||||
// Use list of suggestions in a file.
|
// Use list of suggestions in a file.
|
||||||
spell_suggest_file(su, buf + 5);
|
spell_suggest_file(su, buf + 5);
|
||||||
else
|
else if (!did_intern)
|
||||||
{
|
{
|
||||||
// Use internal method.
|
// Use internal method once.
|
||||||
spell_suggest_intern(su, interactive);
|
spell_suggest_intern(su, interactive);
|
||||||
if (sps_flags & SPS_DOUBLE)
|
if (sps_flags & SPS_DOUBLE)
|
||||||
do_combine = TRUE;
|
do_combine = TRUE;
|
||||||
|
did_intern = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
2379,
|
||||||
/**/
|
/**/
|
||||||
2378,
|
2378,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user