diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2020-09-02 22:31:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-02 22:31:31 -0700 |
commit | 3acfefb63ee70c8eac13bf6b308a0e73e6fb8007 (patch) | |
tree | 1a891b01dbca622ed8e4cbb5930d1a6425d146ba /src/nvim/spell.c | |
parent | 948e625e1ecbdb1d4771e1481b3d6534b21250c9 (diff) | |
parent | 5fcdb630253b8d71fd30a2259f72aeb27e1676e0 (diff) | |
download | rneovim-3acfefb63ee70c8eac13bf6b308a0e73e6fb8007.tar.gz rneovim-3acfefb63ee70c8eac13bf6b308a0e73e6fb8007.tar.bz2 rneovim-3acfefb63ee70c8eac13bf6b308a0e73e6fb8007.zip |
Merge #12827 'vim-patch:8.2.{1554,1561,1564,1565,1566}'
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r-- | src/nvim/spell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c index 95948dac78..ad235f1f14 100644 --- a/src/nvim/spell.c +++ b/src/nvim/spell.c @@ -5765,14 +5765,14 @@ cleanup_suggestions ( ) FUNC_ATTR_NONNULL_ALL { - suggest_T *stp = &SUG(*gap, 0); - if (gap->ga_len > 0) { // Sort the list. qsort(gap->ga_data, (size_t)gap->ga_len, sizeof(suggest_T), sug_compare); // Truncate the list to the number of suggestions that will be displayed. if (gap->ga_len > keep) { + suggest_T *const stp = &SUG(*gap, 0); + for (int i = keep; i < gap->ga_len; i++) { xfree(stp[i].st_word); } |