mirror of
https://github.com/vim/vim.git
synced 2026-05-28 00:21:37 +02:00
patch 9.1.1929: completion: spell completion wrong with fuzzy
Problem: completion: spell completion wrong with fuzzy
Solution: Disable fuzzy sort for spell completion
(Maxim Kim)
fixes #18800
closes: #18809
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
712b650332
commit
0e1ab0adb8
+1
-1
@@ -5710,7 +5710,7 @@ ins_compl_get_exp(pos_T *ini)
|
||||
}
|
||||
may_trigger_modechanged();
|
||||
|
||||
if (match_count > 0)
|
||||
if (match_count > 0 && !ctrl_x_mode_spell())
|
||||
{
|
||||
if (is_nearest_active() && !ins_compl_has_preinsert())
|
||||
sort_compl_match_list(cp_compare_nearest);
|
||||
|
||||
@@ -1320,6 +1320,23 @@ func Test_complete_wholeline()
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
" Test for using CTRL-X CTRL-S to complete spell suggestions
|
||||
func Test_complete_spell()
|
||||
new
|
||||
setlocal spell
|
||||
" without fuzzy
|
||||
call setline(1, 'The rigth thing')
|
||||
exe "normal! A\<C-X>\<C-S>"
|
||||
call assert_equal('The right thing', getline(1))
|
||||
%d
|
||||
" with fuzzy
|
||||
setlocal completeopt+=fuzzy
|
||||
call setline(1, 'The rigth thing')
|
||||
exe "normal! A\<C-X>\<C-S>"
|
||||
call assert_equal('The right thing', getline(1))
|
||||
bw!
|
||||
endfunc
|
||||
|
||||
" Test insert completion with 'cindent' (adjust the indent)
|
||||
func Test_complete_with_cindent()
|
||||
new
|
||||
|
||||
@@ -729,6 +729,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1929,
|
||||
/**/
|
||||
1928,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user