diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-09-16 09:10:51 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2025-03-27 07:26:42 +0800 |
commit | fbac2545110bec653a0cc984b04e3636593ec214 (patch) | |
tree | b7c4a8e8bdd55ed58bd12d14377592208bf8dc0c /test | |
parent | bf62672d59299cc548103bdf7d8d162043acd011 (diff) | |
download | rneovim-fbac2545110bec653a0cc984b04e3636593ec214.tar.gz rneovim-fbac2545110bec653a0cc984b04e3636593ec214.tar.bz2 rneovim-fbac2545110bec653a0cc984b04e3636593ec214.zip |
vim-patch:9.1.0733: keyword completion does not work with fuzzy
Problem: keyword completion does not work with fuzzy
(egesip)
Solution: handle ctrl_x_mode_normal() specifically
(glepnir)
fixes: vim/vim#15412
closes: vim/vim#15424
https://github.com/vim/vim/commit/7cfe693f9bfa74690867e4d96c25f2205d0d13e4
Co-authored-by: glepnir <glephunter@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_ins_complete.vim | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/test/old/testdir/test_ins_complete.vim b/test/old/testdir/test_ins_complete.vim index 3accb1f286..97a02adf0d 100644 --- a/test/old/testdir/test_ins_complete.vim +++ b/test/old/testdir/test_ins_complete.vim @@ -2900,10 +2900,38 @@ func Test_complete_fuzzy_match() call feedkeys("Su\<C-X>\<C-L>\<C-P>\<Esc>0", 'tx!') call assert_equal('no one can save me but you', getline('.')) + " issue #15412 + call setline(1, ['alpha bravio charlie']) + call feedkeys("Salpha\<C-X>\<C-N>\<Esc>0", 'tx!') + call assert_equal('alpha bravio', getline('.')) + call feedkeys("Salp\<C-X>\<C-N>\<Esc>0", 'tx!') + call assert_equal('alpha', getline('.')) + call feedkeys("A\<C-X>\<C-N>\<Esc>0", 'tx!') + call assert_equal('alpha bravio', getline('.')) + call feedkeys("A\<C-X>\<C-N>\<Esc>0", 'tx!') + call assert_equal('alpha bravio charlie', getline('.')) + + set complete-=i + call feedkeys("Salp\<C-X>\<C-N>\<Esc>0", 'tx!') + call assert_equal('alpha', getline('.')) + call feedkeys("A\<C-X>\<C-N>\<Esc>0", 'tx!') + call assert_equal('alpha bravio', getline('.')) + call feedkeys("A\<C-X>\<C-N>\<Esc>0", 'tx!') + call assert_equal('alpha bravio charlie', getline('.')) + + call setline(1, ['alpha bravio charlie', 'alpha another']) + call feedkeys("Salpha\<C-X>\<C-N>\<C-N>\<Esc>0", 'tx!') + call assert_equal('alpha another', getline('.')) + call setline(1, ['你好 我好', '你好 他好']) + call feedkeys("S你好\<C-X>\<C-N>\<Esc>0", 'tx!') + call assert_equal('你好 我好', getline('.')) + call feedkeys("S你好\<C-X>\<C-N>\<C-N>\<Esc>0", 'tx!') + call assert_equal('你好 他好', getline('.')) + " issue #15526 set completeopt=fuzzy,menuone,menu,noselect call setline(1, ['Text', 'ToText', '']) - call cursor(2, 1) + call cursor(3, 1) call feedkeys("STe\<C-X>\<C-N>x\<CR>\<Esc>0", 'tx!') call assert_equal('Tex', getline(line('.') - 1)) |