for (i = keep; i < gap->ga_len; ++i)
vim_free(stp[i].st_word);
gap->ga_len = keep;
- return stp[keep - 1].st_score;
+ if (keep >= 1)
+ return stp[keep - 1].st_score;
}
return maxscore;
}
\ .. "Type number and <Enter> or click with mouse (empty cancels): ", a)
set spell spellsuggest=0
- " FIXME: the following line is currently commented out as it triggers a
- " memory error detected in cleanup_suggestions() by asan or valgrind.
- "call assert_equal("\nSorry, no suggestions", execute('norm z='))
+ call assert_equal("\nSorry, no suggestions", execute('norm z='))
" Unlike z=, function spellsuggest(...) should not be affected by the
" max number of suggestions (2) set by the 'spellsuggest' option.