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)
diff --git a/src/spellsuggest.c b/src/spellsuggest.c
index e2423cd..3de9ff2 100644
--- a/src/spellsuggest.c
+++ b/src/spellsuggest.c
@@ -770,6 +770,7 @@
int c;
int i;
langp_T *lp;
+ int did_intern = FALSE;
// Set the info in "*su".
CLEAR_POINTER(su);
@@ -863,12 +864,13 @@
else if (STRNCMP(buf, "file:", 5) == 0)
// Use list of suggestions in a file.
spell_suggest_file(su, buf + 5);
- else
+ else if (!did_intern)
{
- // Use internal method.
+ // Use internal method once.
spell_suggest_intern(su, interactive);
if (sps_flags & SPS_DOUBLE)
do_combine = TRUE;
+ did_intern = TRUE;
}
}
diff --git a/src/version.c b/src/version.c
index 5668f75..2e67f32 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2379,
+/**/
2378,
/**/
2377,