1
0
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:
Bram Moolenaar
2021-01-20 21:42:33 +01:00
parent 99880f96cf
commit 77a849c4b3
2 changed files with 6 additions and 2 deletions

View File

@@ -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;
} }
} }

View File

@@ -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,
/**/ /**/