diff options
author | glepnir <glephunter@gmail.com> | 2024-05-27 15:11:01 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-05-27 15:14:51 +0200 |
commit | 53387c55a13bc1013a6ab721d4bd0bd04c6935c4 (patch) | |
tree | 848aa717c906b8a9f40ec0a5b8e2d4c74544d222 /src/testdir | |
parent | ef73374dc3e4bf8104ba31d5b22517f8028b467a (diff) |
patch 9.1.0447: completion may be wrong when deleting all charsv9.1.0447
Problem: completion may be wrong when deleting all chars
Solution: reset compl_shown_match
closes: #14854
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_ins_complete.vim | 16 | ||||
-rw-r--r-- | src/testdir/test_popup.vim | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/testdir/test_ins_complete.vim b/src/testdir/test_ins_complete.vim index eb89a15c53..d1b96099b1 100644 --- a/src/testdir/test_ins_complete.vim +++ b/src/testdir/test_ins_complete.vim @@ -630,14 +630,14 @@ func Test_pum_with_preview_win() CheckScreendump let lines =<< trim END - funct Omni_test(findstart, base) - if a:findstart - return col(".") - 1 - endif - return [#{word: "one", info: "1info"}, #{word: "two", info: "2info"}, #{word: "three", info: "3info"}] - endfunc - set omnifunc=Omni_test - set completeopt+=longest + func Omni_test(findstart, base) + if a:findstart + return col(".") - 1 + endif + return [#{word: "one", info: "1info"}, #{word: "two", info: "2info"}, #{word: "three", info: "3info"}] + endfunc + set omnifunc=Omni_test + set completeopt+=longest END call writefile(lines, 'Xpreviewscript', 'D') diff --git a/src/testdir/test_popup.vim b/src/testdir/test_popup.vim index f5cb8b2a19..1142efc7b7 100644 --- a/src/testdir/test_popup.vim +++ b/src/testdir/test_popup.vim @@ -1175,6 +1175,8 @@ func Test_CompleteChanged() set completeopt=menu,menuone call feedkeys("i\<C-X>\<C-O>\<BS>\<BS>\<BS>f", 'tx') call assert_equal('five', g:word) + call feedkeys("i\<C-X>\<C-O>\<BS>\<BS>\<BS>f\<BS>", 'tx') + call assert_equal('one', g:word) autocmd! AAAAA_Group set complete& completeopt& |