# HG changeset patch # User Bram Moolenaar # Date 1611175504 -3600 # Node ID 21f49d327f008a946a40be49342262947017b2a9 # Parent f1c73c482aac4abdec9ff11511c58dd96b05f03d patch 8.2.2379: do spell suggestions twice if 'spellsuggest' contains number Commit: https://github.com/vim/vim/commit/77a849c4b3d73c228013a047913c90834a93b4f6 Author: Bram Moolenaar Date: Wed Jan 20 21:42:33 2021 +0100 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 https://github.com/vim/vim/issues/7713) diff --git a/src/spellsuggest.c b/src/spellsuggest.c --- a/src/spellsuggest.c +++ b/src/spellsuggest.c @@ -770,6 +770,7 @@ spell_find_suggest( int c; int i; langp_T *lp; + int did_intern = FALSE; // Set the info in "*su". CLEAR_POINTER(su); @@ -863,12 +864,13 @@ spell_find_suggest( 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 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2379, +/**/ 2378, /**/ 2377,