Mercurial > vim
changeset 23675:21f49d327f00 v8.2.2379
patch 8.2.2379: do spell suggestions twice if 'spellsuggest' contains number
Commit: https://github.com/vim/vim/commit/77a849c4b3d73c228013a047913c90834a93b4f6
Author: Bram Moolenaar <Bram@vim.org>
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 20 Jan 2021 21:45:04 +0100 |
parents | f1c73c482aac |
children | 268e87b770cd |
files | src/spellsuggest.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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; } }