aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spell.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-22 12:23:58 -0500
committerGitHub <noreply@github.com>2021-01-22 12:23:58 -0500
commit24b60322a25b7bc254663d9fc9fbb15cc348b850 (patch)
tree1b81b4bb63c16cb38eaead41be75885c2200f0da /src/nvim/spell.c
parent93402606fa46a80dff2362920c85f4497ed2a216 (diff)
parent30ef922f3908edae9511c029da294b92f342a1cc (diff)
downloadrneovim-24b60322a25b7bc254663d9fc9fbb15cc348b850.tar.gz
rneovim-24b60322a25b7bc254663d9fc9fbb15cc348b850.tar.bz2
rneovim-24b60322a25b7bc254663d9fc9fbb15cc348b850.zip
Merge pull request #13818 from janlazo/vim-8.2.2379
vim-patch:8.2.{2375,2379,2384,2385}
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r--src/nvim/spell.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index 5714f5e425..6425c9fed5 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -3123,6 +3123,7 @@ spell_find_suggest (
static bool expr_busy = false;
int c;
langp_T *lp;
+ bool did_intern = false;
// Set the info in "*su".
memset(su, 0, sizeof(suginfo_T));
@@ -3206,14 +3207,16 @@ spell_find_suggest (
spell_suggest_expr(su, buf + 5);
expr_busy = false;
}
- } else if (STRNCMP(buf, "file:", 5) == 0)
+ } else if (STRNCMP(buf, "file:", 5) == 0) {
// Use list of suggestions in a file.
spell_suggest_file(su, buf + 5);
- else {
- // Use internal method.
+ } else if (!did_intern) {
+ // Use internal method once.
spell_suggest_intern(su, interactive);
- if (sps_flags & SPS_DOUBLE)
+ if (sps_flags & SPS_DOUBLE) {
do_combine = true;
+ }
+ did_intern = true;
}
}